Oracle® Java ME Embedded Getting Started Guide for the Reference Platform (Qualcomm IoE) Release 8 E48513-03 |
|
Previous |
Next |
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 I/O APIs.
Note that any IMlet that accesses the Device I/O 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 I/O APIs.
Note: Power Management, and MMIO are not supported on the Qualcomm IoE embedded board. |
To access any device from the preconfigured peripheral list, the following permission is required:
jdk.dio.DeviceMgmtPermission(%Name%:%ID%);
The names and IDs for specific devices can be found in the tables below in this appendix. You must also specify an action. An empty string means open
.
The tables use the following legend:
Device ID - an integer identifier that can be used to open the peripheral with a DeviceManager
.
Device Name - the string name of a peripheral that can be used to open it by name with DeviceManager
.
Mapped - 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 DeviceConfig
constructor in order to open the peripheral by ID or name. The configuration can be used to open the peripheral using the DeviceManager
with the appropriate configuration.
The following AT devices are pre-configured.
Device ID | Device Name | Mapped | Configuration |
---|---|---|---|
800 |
DEFAULT |
Brew's AT command interface |
|
For a complete list of AT commands that can be used, see the Qualcomm IoE Development Platform User 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.
Device ID | Device Name | Mapped | Configuration |
---|---|---|---|
100 |
VTHERM_N |
ADT7481 |
|
101 |
HKAIN1 |
Any pin from J10 header. Pin number is chosen according to the configuration of ADC multiplexer |
|
Note the following:
The channel number set as DeviceConfig.DEFAULT
is interpreted as 1, that is, the ADC channel connected to a multiplexer on the Qualcomm IoE board will be opened by default.
The resolution and controller number are not supported. You can use DeviceConfig.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 can be also configured. The samplingTime
value of DeviceConfig.DEFAULT
is interpreted as 10 usec.
The maximum possible sampling interval is 5000 milliseconds or 5 sec.
The following Digital-to-Analog (DAC) devices are preconfigured.
Device ID | Device Name | Mapped | Configuration |
---|---|---|---|
700 |
PDM0 |
Header J5 pin 18 |
|
701 |
PDM1 |
Reserved for future use; not available on Qualcomm IoE |
|
Note the following:
The channelNumber
parameter can be set to 0, 1, or DeviceConfig.DEFAULT
, which is interpreted as 0.
Both the resolution
and controllerNumber
values are ignored. You can only use DeviceConfig.DEFAULT
for those values.
The default samplingInterval
value is 500000 microseconds (500 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 the DAC signal in the current implementation; only the min
and max
values 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 preconfigured.
Device ID | Device Name | Mapped | Configuration |
---|---|---|---|
0 |
GPIO0 |
Header J5 pin 3 |
|
1 |
GPIO1 |
Header J5 pin 5 JP7 ADC MUX 0 |
|
2 |
GPIO2 |
Header J5 pin 7 JP8 ADC MUX 1 |
|
3 |
GPIO3 |
Header J5 pin 9 JP9 ADC MUX 2 |
|
4 |
GPIO4 |
Header J5 pin 11 |
|
5 |
GPIO5 |
Header J6 pin 3 |
|
6 |
GPIO6 |
Header J6 pin 5 JP11 pin 2 (to connect to G-sensor interrupt) |
|
7 |
GPIO7 |
Header J6 pin 7 JP12 pin 2 (to connect to light sensor interrupt) |
|
8 |
GPIO8 |
Header J6 pin 7 |
|
9 |
GPIO9 |
Header J6 pin 11 JP13 pin 1(to connect to temperature sensor interrupt) |
|
10 |
GPIO10 |
Header J7 pin 1 Relay 1 |
|
11 |
GPIO11 |
Header J7 pin 3 Relay 2 |
|
12 |
GPIO12 |
Header J7 pin 5 |
|
13 |
GPIO13 |
Header J7 pin 7 |
|
14 |
GPIO14 |
Header J7 pin 9 Jumper P2 pin 2 (Used by LED) |
|
15 |
GPIO15 |
Header J7 pin 11 Jumper P3 pin 2 (Used by LED) |
|
16 |
GPIO16 |
Header J7 pin 13 Jumper P4 pin 2 (Used by LED) |
|
17 |
GPIO17 or LED2 |
Header J7 pin 15 Jumper P5 pin 2 (Used by LED) |
|
18 |
GPIO18 |
Header J7 pin 17 Jumper P6 pin 2 (Used by LED) |
|
19 |
GPIO19 |
Header J7 pin 19 |
|
20 |
GPIO20 |
Header J7 pin 2 DB9 J12 lower pin 3 |
|
21 |
GPIO21 |
Header J7 pin 4 DB9 J12 lower pin 2 |
|
22 |
GPIO22 |
Header J7 pin 6 |
|
23 |
GPIO23 |
Header J7 pin 8 |
|
24 |
GPIO24 |
Header J7 pin 10 DB9 J10 lower pin 2 |
|
Note the following:
pinNumber
set to DeviceConfig.DEFAULT
is interpreted as 34, that is, the GPIO pin connected to the LED using the P3 jumper will be opened by default.
controllerNumber
can be set only to DeviceConfig.DEFAULT
, so pinNumber
is the unique identifier of the GPIO pin on the Brew MP platform.
Configuration of the GPIO mode is not supported by the Brew MP platform, so the mode
parameter can be set only as DeviceConfig.DEFAULT
.
TRIGGER_BOTH_EDGES
and TRIGGER_BOTH_LEVELS
are not supported by the Brew MP 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 the ADC multiplexer. S ee the Qualcomm IoE Development Platform User Guide at the following link for more information.
GPIO6, GPIO7, and GPIO9 can be used as interrupt pins for the onboard sensors. For more information, see the Qualcomm IoE Development Platform User Guide and the sensors data sheet.
GPIO10 and GPIO11 can be used to control the state of the on-board relays.
GPIO14, GPIO15, GPIO16, GPIO17, and GPIO18 can be used to drive a signal to the on-board LEDs. The same is true for "LEDS" port. For more information, please see the Qualcomm IoE Development Platform User Guide.
GPIO20, GPIO21, and GPIO24 drive the signal to one of the DB9 connector pins that is available onboard.
The following GPIO ports are preconfigured.
Device ID | Device Name | Mapped | 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) |
mode of pins = trigger of pins = |
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 |
mode of pins = trigger of pins = |
The following configurations can be used to communicate to I2C slaves.
Device ID | Device Name | Mapped | Configuration |
---|---|---|---|
300 |
G-SENSOR |
BMA150 |
|
301 |
LIGHT-SENSOR |
ISL29011 |
|
302 |
TEMP-SENSOR |
ADT7481 |
|
303 |
BATTERY-GAUGE |
On-board battery gauge (specification is unknown) |
|
Note the following:
The protocol of the on-board battery gauge is unknown.
The default clock frequency is 400000 Hz, and is represented by DeviceConfig.DEFAULT
. 100000 Hz is also supported as a clockFrequency
.
The I2C device number can be set only to 1, which is also represented by DeviceConfig.DEFAULT
.
addressSize
must be set either to DeviceConfig.DEFAULT
or to 7. 10-bit addressing mode is not supported.
The pulse counter has the following configuration.
Device ID | Device Name | Mapped | Configuration |
---|---|---|---|
600 |
COUNTER |
GPIO pin 35, Header J7 pin 7 |
|
Note the following:
Only the values TYPE_RISING_EDGE_ONLY
and TYPE_FALLING_EDGE_ONLY
are supported for the type
parameter on the Brew MP platform.
The controllerNumber
and channelNumber
parameters can be set only to DeviceConfig.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.
Device ID | Device Name | Mapped | Configuration |
---|---|---|---|
400 |
G-SENSOR |
BMA150 |
|
Note the following:
DeviceConfig.DEFAULT
passed as controllerNumber
is interpreted as 1 and because only one SPI device with number 1 is presented on the Qualcomm IoE, only 1 or the DeviceConfig.DEFAULT value of controllerNumber
is supported.
clockFrequency
set to DeviceConfig.DEFAULT
is interpreted as 2000000 Hz.
wordLength
and bitOrdering
are ignored on the Qualcomm IoE board.
On the Qualcomm IoE board, address 0 is supported because there is only one CS pin available. The address number can be passed only using 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}
There are restrictions on Java SPI API usage:
Only 32 bits per word
The CS active level cannot be managed with SPIDevice.begin()
and SPIDevice.end()methods.
The CS cannot be set to CS_NOT_CONTROLLED
because it is always controlled by the platform driver.
To connect to an external SPI device, remove JP17 jumper. See section 5.2.3, "SPI" in Qualcomm IoE Development Platform User Guide for more information.
The following UART devices are preconfigured:
Device ID | Device Name | Mapped | Configuration |
---|---|---|---|
40 |
COM1 |
DB9 J10 upper port |
|
Note the following:
There is only one UART port available from the DeviceIO API with ID 40; it has the name COM1
.
The INPUT_DATA_AVAILABLE
and OUTPUT_BUFFER_EMPTY
events are supported on the Qualcomm IoE board.
controllerNumber
can be set only to 1, which is the value presented by DeviceConfig.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