Beta Draft: 2015-08-31
A Device I/O Preconfigured List
This appendix describes the proper ID and names for the various peripheral ports for the Freescale FRDM-K64F board, which are accessible using the Device I/O APIs.
The tables use the following legend:
-
Device ID: an integer identifier that can be used to open the device with the methods of the
DeviceManager
class. -
Device Name: the string name of a device that can be used to open it by name with the methods of the
DeviceManager class
. -
Mapped: all hardware-related information regarding a peripheral, such as physical location, mapping, or port. This information enables the user to determine the peripheral's location on a target board.
-
Configuration: properties that are passed to the specific
DeviceConfig
constructor to open the peripheral by ID or name. The configuration can be used to open the peripheral using theDeviceManager
with the appropriate configuration.
GPIO Pins
The following GPIO pins are preconfigured.
Devicel ID | Device Name | Mapped | Configuration |
---|---|---|---|
1 | LED1 |
LED1 | controllerNumber = 1
|
2 | LED2 |
LED2 | controllerNumber = 4
|
3 | LED3 |
LED3 | controllerNumber = 1
|
4 | SW2 |
SW2 | controllerNumber = 2
|
5 | SW3 |
SW3 | controllerNumber = 0
|
GPIO Ports
The following GPIO ports are preconfigured.
Devicel ID | Device Name | Mapped | Configuration |
---|---|---|---|
6 | LEDS |
LED1, LED2, LED3 | direction = GPIOPinConfig.DIR_OUTPUT_ONLY
For a particular pin, see GPIO pin details for IDs 1, 2, and 3. |
I2C
The following I2C devices are preconfigured.
Device ID | Device Name | Mapped | Configuration |
---|---|---|---|
200 | FXOS8700CQ |
FXOS8700CQ: Digital Sensor - 3D Accelerometer
+ 3D Magnetometer |
controllerNumber = 0
|
PWM
The following PWM devices are preconfigured.
Device ID | Device Name | Mapped | Configuration |
---|---|---|---|
600 | PWM1.1 |
PTA0 | controllerNumber = UNASSIGNED
|
601 | PWM2.1 |
PTC4 | controllerNumber = UNASSIGNED
|
SPI
The following SPI devices are preconfigured.
Device ID | Device Name | Mapped | Configuration |
---|---|---|---|
300 | SPI0.0 |
SPI0 | controllerNumber = 0
c
|
The clockMode
parameter defines a clock polarity and phase as follows:
-
0 = CPOL_Low|CPHA_1Edge;
-
1 = CPOL_Low|CPHA_2Edge;
-
2 = CPOL_High|CPHA_1Edge;
-
3 = CPOL_High|CPHA_2Edge
The bitOrdering
parameter defines the bit ordering of the slave device. The possible values are 0 - Device.LITTLE_ENDIAN
, 1 - Device.BIG_ENDIAN
.
UART
The following UART devices are preconfigured.
Device ID | Device Name | Mapped | Configuration |
---|---|---|---|
100 | UART3 |
UART3 | controllerName = UART3
|
DAC
The following Digital-to-Analog (DAC) devices are preconfigured.
Device ID | Device Name | Mapped | Configuration |
---|---|---|---|
500 | DAC0.0 |
DAC0_OUT | converterNumber = UNASSIGNED
|
Pulse Counter
The following Pulse Counter devices are preconfigured.
Device ID | Device Name | Mapped | Configuration |
---|---|---|---|
700 | PULSE 0.0 |
PTA1 | controllerNumber = UNASSIGNED
|
701 | PULSE1.0 |
PTA4 | controllerNumber = UNASSIGNED
|
ADC
The following Analog-to-Digital (ADC) devices are preconfigured.
Device ID | Device Name | Mapped | Configuration |
---|---|---|---|
400 | ADC0_PTB2 |
ADC0 Pin PTB2 | channelNumber = 0
|
401 | ADC1_PTB3 |
ADC1 Pin PTB3 | channelNumber = 1
|
402 | ADC2_PTB10 |
ADC2 Pin PTB10 | channelNumber = 2
|
403 | ADC3_PTB11 |
ADC3 Pin PTB11 | channelNumber = 3
|
404 | ADC4_PTC11 |
ADC4 Pin PTC11 | channelNumber = 4
|
405 | ADC5_PTC10 |
ADC5 Pin PTC10 | channelNumber = 5
|