Oracle® Java ME Embedded Getting Started Guide for the Reference Platform (Qualcomm IoE) Release 8 EA 2 E48513-01 |
|
Previous |
Next |
Beta Draft: 2014-03-25
This appendix provides information about the various peripheral ports and buses for the Qualcomm IoE embedded board, as well as device mappings and important notes, which are accessible using the Device Access APIs.
Note that any IMlet that accesses the Device Access APIs must be digitally signed using a trusted certificate authority. An IMlet that is not signed will encounter an authentication error when attempting to access the Device Access APIs.
Note: Power Management, and MMIO are not supported on the Qualcomm IoE embedded board. |
The tables use the following legend:
DA API Peripheral Id - an integer identifier that can be used to open the peripheral with a PeripheralManager
.
DA API Peripheral Name - the string name of a peripheral that can be used to open it by name with PeripheralManager
.
Mapped To - all hardware related information regarding a peripheral, such as physical location, mapping, or port. This information enables the user to find out the peripheral's location on a target board. See the following site for more information:
Configuration - properties that are passed to the specific PeripheralConfig
constructor in order to open the peripheral by ID or name. The configuration can be used to open the peripheral using the PeripheralManager
with the appropriate configuration.
The following AT devices are pre-configured.
DAAPI Peripheral ID | DAAPI Peripheral Name | Mapped To | Configuration |
---|---|---|---|
800 |
DEFAULT |
Brew's AT command interface |
|
For a complete list of AT commands that can be used, please see the Qualcomm IoE Development Platform User's Guide.
Please note the following when using AT commands:
Some AT commands require a SIM card to test. (for example, "AT+CPBW
" or "AT+CMUX
")
With the AT+CPBW
command, the valid form is "AT+CPBW=?
" or "AT+CPBW=<num>
". "AT+CPBW?
" is an invalid form.
UnsolicitedResponseHandler
is not supported.
The following Analog-to-Digital (ADC) devices are pre-configured.
DAAPI Peripheral ID | DAAPI Peripheral Name | Mapped To | Configuration |
---|---|---|---|
100 |
VTHERM_N |
On-board Temperature Sensor |
deviceNumber = PeripheralConfig.DEFAULT channelNumber = 0 resolution = PeripheralConfig.DEFAULT samplingInterval = PeripheralConfig.DEFAULT samplingTime = PeripheralConfig.DEFAULT |
101 |
HKAIN1 |
Any pin from J10 header. Pin number is chosen according to the configuration of ADC multiplexer |
deviceNumber = PeripheralConfig.DEFAULT channelNumber = 1 resolution = PeripheralConfig.DEFAULT samplingInterval = PeripheralConfig.DEFAULT samplingTime = PeripheralConfig.DEFAULT |
Please note the following:
The
channel number set as PeripheralConfig.DEFAULT
is interpreted as 1, i.e. ADC channel connected to a multiplexer on the Qualcomm IoE board will be opened by default.
The resolution and device number are not supported. You can use PeripheralConfig.DEFAULT
for those values. The resolution of ADC is 8 bits.
The default value for samplingInterval
is 500000 microseconds (500 ms). The value can be changed immediately during acquisition. This is a platform-specific behavior.
The sampling time is also configurable. The samplingTime
value of PeripheralConfig.DEFAULT
is interpreted as 10 milliseconds.
The following Digital-to-Analog (DAC) devices are pre-configured.
DAAPI Peripheral ID | DAAPI Peripheral Name | Mapped To | Configuration |
---|---|---|---|
700 |
PDM0 |
Header J5 pin 18 |
deviceNumber = PeripheralConfig.DEFAULT channelNumber = 0 resolution = PeripheralConfig.DEFAULT samplingInterval = PeripheralConfig.DEFAULT |
701 |
PDM1 |
Reserved for future use; not available on Qualcomm IoE |
deviceNumber = PeripheralConfig.DEFAULT channelNumber = 1 resolution = PeripheralConfig.DEFAULT samplingInterval = PeripheralConfig.DEFAULT |
Please note the following:
The channelNumber
parameter can be set to 0, 1, or PeripheralConfig.DEFAULT
, which is interpreted as 0.
Both the resolution
and deviceNumber
values are ignored. You can only use PeripheralConfig.DEFAULT
for those values.
The default samplingInterval
value is 5000000 micro seconds (5000 ms). The value can be changed immediately during generation. This is a platform-specific behavior.
The DAC signal is represented as a PDM (pulse density modulation) signal, so the DAC output value affects only the frequency of output signal, not the voltage level. As such, there is no resolution of DAC in the current implementation, only the min
and max
value can be used for calculation of output voltage on the DAC channel.
For calculation of the output voltage, the following formula can be used: vOutput = (value * vRef) / (maxValue - minValue + 1)
. Note that (max - min) == (2în - 1)
is not applicable.
The following GPIO pins are pre-configured.
DAAPI Peripheral ID | DAAPI Peripheral Name | Mapped To | Configuration |
---|---|---|---|
0 |
GPIO0 |
Header J5 pin 3 |
portNumber = PeripheralConfig.DEFAULT pinNumber = 26 direction = GPIOPinConfig.DIR_INPUT_ONLY mode = PeripheralConfig.DEFAULT trigger = GPIOPinConfig.TRIGGER_RISING_EDGE initValue - ignored |
1 |
GPIO1 |
Header J5 pin 5 JP7 ADC MUX 0 |
portNumber = PeripheralConfig.DEFAULT pinNumber = 25 direction = GPIOPinConfig.DIR_INPUT_ONLY mode = PeripheralConfig.DEFAULT trigger = GPIOPinConfig.TRIGGER_RISING_EDGE initValue - ignored |
2 |
GPIO2 |
Header J5 pin 7 JP8 ADC MUX 1 |
portNumber = PeripheralConfig.DEFAULT pinNumber = 31 direction = GPIOPinConfig.DIR_INPUT_ONLY mode = PeripheralConfig.DEFAULT trigger = GPIOPinConfig.TRIGGER_FALLING_EDGE initValue - ignored |
3 |
GPIO3 |
Header J5 pin 9 JP9 ADC MUX 2 |
portNumber = PeripheralConfig.DEFAULTpinNumber = 17direction = GPIOPinConfig.DIR_INPUT_ONLYmode = PeripheralConfig.DEFAULTtrigger = GPIOPinConfig.TRIGGER_HIGH_LEVELinitValue - ignored |
4 |
GPIO4 |
Header J5 pin 11 |
portNumber = PeripheralConfig.DEFAULT pinNumber = 32 direction = GPIOPinConfig.DIR_INPUT_ONLY mode = PeripheralConfig.DEFAULT trigger = GPIOPinConfig.TRIGGER_HIGH_LEVEL initValue - ignored |
5 |
GPIO5 |
Header J6 pin 3 |
portNumber = PeripheralConfig.DEFAULT pinNumber = 28 direction = GPIOPinConfig.DIR_INPUT_ONLY mode = PeripheralConfig.DEFAULT trigger = GPIOPinConfig.TRIGGER_HIGH_LEVEL initValue - ignored |
6 |
GPIO6 |
Header J6 pin 5 JP11 pin 2(to connect to G-sensor Interrupt) |
portNumber = PeripheralConfig.DEFAULT pinNumber = 27 direction = GPIOPinConfig.DIR_INPUT_ONLY mode = PeripheralConfig.DEFAULT trigger = GPIOPinConfig.TRIGGER_RISING_EDGE initValue - ignored |
7 |
GPIO7 |
Header J6 pin 7 JP12 pin 2 (to connect to light sensor interrupt) |
portNumber = PeripheralConfig.DEFAULT pinNumber = 30 direction = GPIOPinConfig.DIR_INPUT_ONLY mode = PeripheralConfig.DEFAULT trigger = GPIOPinConfig.TRIGGER_FALLING_EDGE initValue - ignored |
8 |
GPIO8 |
Header J6 pin 7 |
portNumber = PeripheralConfig.DEFAULT pinNumber = 38 direction = GPIOPinConfig.DIR_INPUT_ONLY mode = PeripheralConfig.DEFAULT trigger = GPIOPinConfig.TRIGGER_LOW_LEVEL initValue - ignored |
9 |
GPIO9 |
Header J6 pin 11 JP13 pin 1(to connect to temp sensor interrupt) |
portNumber = PeripheralConfig.DEFAULT pinNumber = 33 direction = GPIOPinConfig.DIR_INPUT_ONLY mode = PeripheralConfig.DEFAULT trigger = GPIOPinConfig.TRIGGER_FALLING_EDGE initValue - ignored |
10 |
GPIO10 |
Header J7 pin 1 Relay 1 |
portNumber = PeripheralConfig.DEFAULT pinNumber = 18 direction = GPIOPinConfig.DIR_OUTPUT_ONLY mode = PeripheralConfig.DEFAULT trigger = GPIOPinConfig.TRIGGER_NONE initValue = false |
11 |
GPIO11 |
Header J7 pin 3 Relay 2 |
portNumber = PeripheralConfig.DEFAULT pinNumber = 24 direction = GPIOPinConfig.DIR_OUTPUT_ONLY mode = PeripheralConfig.DEFAULT trigger = GPIOPinConfig.TRIGGER_NONE initValue = false |
12 |
GPIO12 |
Header J7 pin 5 |
portNumber = PeripheralConfig.DEFAULT pinNumber = 29 direction = GPIOPinConfig.DIR_OUTPUT_ONLY mode = PeripheralConfig.DEFAULT trigger = GPIOPinConfig.TRIGGER_NONE initValue = false |
13 |
GPIO13 |
Header J7 pin 7 |
portNumber = PeripheralConfig.DEFAULT pinNumber = 35 direction = GPIOPinConfig.DIR_OUTPUT_ONLY mode = PeripheralConfig.DEFAULT trigger = GPIOPinConfig.TRIGGER_NONE initValue = false |
14 |
GPIO14 |
Header J7 pin 9 Jumper P2 pin 2 (Used by LED) |
portNumber = PeripheralConfig.DEFAULT pinNumber = 13 direction = GPIOPinConfig.DIR_OUTPUT_ONLY mode = PeripheralConfig.DEFAULT trigger = GPIOPinConfig.TRIGGER_NONE initValue = false |
15 |
GPIO15 |
Header J7 pin 11 Jumper P3 pin 2 (Used by LED) |
portNumber = PeripheralConfig.DEFAULT pinNumber = 34 direction = GPIOPinConfig.DIR_OUTPUT_ONLY mode = PeripheralConfig.DEFAULT trigger = GPIOPinConfig.TRIGGER_NONE initValue = false |
16 |
GPIO16 |
Header J7 pin 13 Jumper P4 pin 2 (Used by LED) |
portNumber = Peripheral.Config.DEFAULT pinNumber = 12 direction = GPIOPinConfig.DIR_OUTPUT_ONLY mode = PeripheralConfig.DEFAULT trigger = GPIOPinConfig.TRIGGER_NONE initValue = false |
17 |
GPIO17 or LED2 |
Header J7 pin 15 Jumper P5 pin 2 (Used by LED) |
portNumber = PeripheralConfig.DEFAULT pinNumber = 16 direction = GPIOPinConfig.DIR_OUTPUT_ONLY mode = PeripheralConfig.DEFAULT trigger = GPIOPinConfig.TRIGGER_NONE initValue = false |
18 |
GPIO18 |
Header J7 pin 17 Jumper P6 pin 2 (Used by LED) |
portNumber = PeripheralConfig.DEFAULT pinNumber = 36 direction = GPIOPinConfig.DIR_OUTPUT_ONLY mode = PeripheralConfig.DEFAULT trigger = GPIOPinConfig.TRIGGER_NONE initValue = false |
19 |
GPIO19 |
Header J7 pin 19 |
portNumber = PeripheralConfig.DEFAULT pinNumber = 15 direction = GPIOPinConfig.DIR_OUTPUT_ONLY mode = PeripheralConfig.DEFAULT trigger = GPIOPinConfig.TRIGGER_NONE initValue = false |
20 |
GPIO20 |
Header J7 pin 2 DB9 J12 lower pin 3 |
portNumber = PeripheralConfig.DEFAULT pinNumber = 10 direction = GPIOPinConfig.DIR_INPUT_ONLY mode = PeripheralConfig.DEFAULT trigger = GPIOPinConfig.TRIGGER_LOW_LEVEL initValue - ignored |
21 |
GPIO21 |
Header J7 pin 4 DB9 J12 lower pin 2 |
portNumber = PeripheralConfig.DEFAULT pinNumber = 14 direction = GPIOPinConfig.DIR_INPUT_ONLY mode = PeripheralConfig.DEFAULT trigger = GPIOPinConfig.TRIGGER_LOW_LEVEL initValue - ignored |
22 |
GPIO22 |
Header J7 pin 6 |
portNumber = PeripheralConfig.DEFAULT pinNumber = 11 direction = GPIOPinConfig.DIR_OUTPUT_ONLY mode = PeripheralConfig.DEFAULT trigger = GPIOPinConfig.TRIGGER_NONE initValue = false |
23 |
GPIO23 |
Header J7 pin 8 |
portNumber = PeripheralConfig.DEFAULT pinNumber = 9 direction = GPIOPinConfig.DIR_OUTPUT_ONLY mode = PeripheralConfig.DEFAULT trigger = GPIOPinConfig.TRIGGER_NONE initValue = false |
24 |
GPIO24 |
Header J7 pin 10 DB9 J10 lower pin 2 |
portNumber = PeripheralConfig.DEFAULT pinNumber = 37 direction = GPIOPinConfig.DIR_OUTPUT_ONLY mode = PeripheralConfig.DEFAULT trigger = GPIOPinConfig.TRIGGER_NONE initValue = false |
Please note the following:
pinNumber
set to PeripheralConfig.DEFAULT
is interpreted as 34, i.e. GPIO pin connected to LED via P3 jumper will be opened by default.
portNumber
can only be set to PeripheralConfig.DEFAULT
, so pinNumber
is the unique identifier of the GPIO pin on the Brew MP platform.
Configuration of GPIO mode is not supported by the BrewMP platform, so the mode
parameter can only be set as PeripheralConfig.DEFAULT
.
TRIGGER_BOTH_EDGES
and TRIGGER_BOTH_LEVELS
are not supported by the BrewMP platform.
Some GPIO pins are mapped to several physical pins; this allows the programmer to use a GPIO pin in different ways. For example:
GPIO1, GPIO2 and GPIO3 can be used to control ADC multiplexer. Please see the Qualcomm IoE Development Platform User's Guide at the following link for more information.
GPIO6, GPIO7, GPIO9 can be used as interrupt pins for the onboard sensors. For more information, please see the Qualcomm IoE Development Platform User's Guide and sensors data sheet.
GPIO10, GPIO11 can be used to control the state of on-board's relays
GPIO14, GPIO15, GPIO16, GPIO17, GPIO18 can be used to drive a signal to the on-board's leds. In this case leds related must be shorted. The same is true for "LEDS" port. For more information, please see the Qualcomm IoE Development Platform User's Guide.
GPIO20, GPIO21, GPIO24 drives the signal to one of DB9 connectors' pin that is available on-board.
The following GPIO ports are pre-configured.
DAAPI Peripheral ID | DAAPI Peripheral Name | Mapped To | Configuration |
---|---|---|---|
200 |
LEDS |
Header J7 pin 9 and Jumper P2 pin 2 (used by LED) Header J7 pin 11 and Jumper P3 pin 2 (used by LED) Header J7 pin 13 and Jumper P4 pin 2 (used by LED) Header J7 pin 15 and Jumper P5 pin 2 (used by LED) Header J7 pin 17 and Jumper P6 pin 2 (used by LED) |
direction = GPIOPortConfig.DIR_OUTPUT_ONLY initValue = false pins = 13, 34, 12, 16. 36 mode of pins = PeripheralConfig.DEFAULT trigger of pins = GPIOPinConfig.TRIGGER_NONE |
80 |
ADC-MUX-SEL |
Header J5 pin 5 and JP7 ADC MUX 0 Header J5 pin 7 and JP8 ADC MUX 1 Header J5 pin 9 and JP9 ADC MUX 2 |
direction = GPIOPortConfig.DIR_OUTPUT_ONLY initValue = false pins = 25, 31, 17 mode of pins = PeripheralConfig.DEFAULT trigger of pins = GPIOPinConfig.TRIGGER_NONE |
The following configurations can be used to communicate to I2C slaves.
DAAPI Peripheral ID | DAAPI Peripheral Name | Mapped To | Configuration |
---|---|---|---|
300 |
G-SENSOR |
On-board G-Sensor |
deviceNumber = 1 address = 56 addressSize = PeripheralConfig.DEFAULT clockFrequency = 400000 |
301 |
LIGHT-SENSOR |
On-board Light Sensor |
deviceNumber = 1 address = 68 addressSize = PeripheralConfig.DEFAULT clockFrequency = 400000 |
302 |
TEMP-SENSOR |
On-board Temperature sensor |
deviceNumber = 1 address = 75 addressSize = PeripheralConfig.DEFAULT clockFrequency = 400000 |
303 |
BATTERY-GAUGE |
On-board Battery Gauge |
deviceNumber = 1 address = 85 addressSize = PeripheralConfig.DEFAULT clockFrequency = 400000 |
Please note the following:
The protocol of the on-board battery gauge is unknown.
The default clock frequency is 400000 Hz, and is represented by PeripheralConfig.DEFAULT
. 100000 Hz is also supported as a clockFrequency
.
The I2C device number can only be set to 1, which is also represented by PeripheralConfig.DEFAULT
.
addressSize
must be set either to PeripheralConfig.DEFAULT
or to 7. 10-bit addressing mode is not supported.
The pulse counter has the following configuration:
DAAPI Peripheral ID | DAAPI Peripheral Name | Mapped To | Configuration |
---|---|---|---|
600 |
COUNTER |
GPIO pin 35, Header J7 pin 7 |
deviceNumber = PeripheralConfig.DEFAULT channelNumber = PeripheralConfig.DEFAULT type = TYPE_RISING_EDGE_ONLY GPIO portNumber = PeripheralConfig.DEFAULT GPIO pinNumber = 35 |
Please note the following:
Only the values TYPE_RISING_EDGE_ONLY
and TYPE_FALLING_EDGE_ONLY
are supported for the type
parameter on the BrewMP platform.
The deviceNumber
and chanelNumber
parameters can be set only to PeripheralConfig.DEFAULT
.
A minimum supported period is 1000 microseconds (1 millisecond). Values less than 1000 microseconds cause exceptions.
The SPI has a single static configuration with the following parameters:
DAAPI Peripheral ID | DAAPI Peripheral Name | Mapped To | Configuration |
---|---|---|---|
400 |
G-SENSOR |
On-board G-Sensor |
deviceNumber = 1 wordLength = 8 clockFrequency = 26000000 clockMode = 3 address = 0 bitOrdering = PeripheralConfig.DEFAULT |
Please note the following:
PeripheralConfig.DEFAUT
passed as deviceNumber
is interpreted as 1 and because of only one SPI device with number 1 is presented on the Qualcomm IoE, only 1 or PeripheralConfig.DEFAULT
value of deviceNumber
is supported.
clockFrequency
set to PeripheralConfig.DEFAULT
is interpreted as 2000000 Hz.
wordLength
(always 8) and bitOrdering
are ignored on the Qualcomm IoE board.
On the IoE board, address 0 is supported because there is only one CS pin available. The address number can be passed only via the first byte of address
parameter of SPIDeviceConfig
.
There are also some global SPI related options that are set for all SPI slaves:
Chip select pin mode (0
: chip select de-assert; 1
: chip select keep asserted). This value is set to 1
by default.
The minimal frequency value in Hz is set to 0.
The de-assertion time value is set to 1000 by default.
If you must change any of these properties for some SPI device, you can add the following in the jwc_properties.ini
file:
deviceaccess.spi.{bus_id}.{slave_address}.csMode = {value} deviceaccess.spi.{bus_id}.{slave_address}.minFreq = {value} deviceaccess.spi.{bus_id}.{slave_address}.deassertionTime = {value}
Restrictions on Java SPI API usage
Only 32 bits per word
CS active level cannot be managed with SPIDevice.begin()
and SPIDevice.end()methods.
CS cannot be set to CS_NOT_CONTROLLED
because it is always controlled by the platform driver.
In order to connect an external SPI device, remove JP17 jumper. Refer to section 5.2.3, "SPI" in the Qualcomm IoE Development Platform User's Guide for more info.
The following UART devices are pre-configured:
DAAPI Peripheral ID | DAAPI Peripheral Name | Mapped To | Configuration |
---|---|---|---|
40 |
COM1 |
DB9 J10 upper port |
uartNumber - ignored baudRate = 19200 dataBits = DATABITS_8 parity = PARITY_NONE stopBits = STOPBITS_1 flowcontrol = FLOWCONTROL_NONE inputBufferSize - ignored outputBufferSize - ignored |
Please note the following:
There is only one UART port available from the DAAPIs with ID 40; it has the name COM1
.
The INPUT_DATA_AVAILABLE
and OUTPUT_BUFFER_EMPTY
events are supported on Qualcomm IoE board.
uartNumber
can only be set to 1, which is the value presented by PeripheralConfig.DEFAULT
.
Only the dataBits
values DATABITS_5, DATABITS_6, DATABITS_7
, and DATABITS_8
are supported.
STOPBITS_1
, STOPBITS_2
are supported
The following baud rates are supported [bps]: 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, 500000, 921600, 1000000