![]() |
Kinetis SDK v.1.2 Demo Applications User's Guide
Rev. 0
Freescale Semiconductor, Inc.
|
The FlexIO I2C example application demonstrates the FlexIO simulated I2C driver working with different methods. The FlexIO I2C example shows transmit/receive between the FlexIO-simulated I2C and I2C1 using these efficiency methods:
These Freescale Freedom development platforms and Tower System modules are supported by the FlexIO I2C example.
This example requires connecting the FlexIO pins with the I2C1 pins. Connect FlexIO pins to the I2C1 pins. Note that the default uses FlexIO pin2 and pin4:
FlexIO Pins | Connects To | I2C1 Pins | |
FlexIO Pin2 | -> | I2C1 SDA | |
FlexIO Pin4 | -> | I2C1 SCL |
Make these connections between the FlexIO pins and the I2C1 pins by using external wires:
FlexIO Pins | Connects To | I2C1 Pins | ||
Pin Name | Board Location | Pin Name | Board Location | |
PTD2/FLEXIO_PIN2 | Primary Elevator B45 | -> | I2C1 SDA | Primary Elevator A8 |
PTD4/FLEXIO_PIN4 | Primary Elevator B59 | -> | I2C1 SCL | Primary Elevator A7 |
FlexIO Pins | Connects To | I2C1 Pins | ||
Pin Name | Board Location | Pin Name | Board Location | |
PTD2/FLEXIO_PIN2 | J2-4 | -> | I2C1 SDA | J2-18 |
PTD4/FLEXIO_PIN4 | J2-6 | -> | I2C1 SCL | J2-20 |
FlexIO Pins | Connects To | I2C1 Pins | ||
Pin Name | Board Location | Pin Name | Board Location | |
PTD2/FLEXIO_PIN2 | J1-5 | -> | I2C1 SDA | J2-18 |
PTD4/FLEXIO_PIN4 | J1-9 | -> | I2C1 SCL | J2-20 |
These instructions are displayed/shown on the terminal window:
Type a character on the keyboard and the FlexIO simulated I2C sends a buffer to the I2C1. It also compares the received buffer on the I2C1 side with the txBuff and checks whether the result is successful. Then, the I2C1 sends a buffer to the FlexIO simulated I2C, compares the receive buffer in the FlexIO simulated I2C side to the txBuff, and checks whether the result is successful.