I2C Read
Introduction
This example demonstrates reading data from I2C based EEPROM devices present in the board. Application reads 20 samples from the EEPROM and exits.
Attention
For AM62D-EVM, Board ID EEPROM address is 0x51u.
SCL and SDA pins of MCU_I2C0 are available at the MCU_HEADER in the board. MCU_I2C0 can be connected to Board ID EEPROM through making the following jumper connections as shown in the image. - Connect Pin 21 of J9 (MCU_I2C0_SDA) to Pin 27 of J3. - Connect Pin 24 of J9 (MCU_I2C0_SCL) to Pin 28 of J3.
```{figure} ../../images/am62dx/i2c_read_am62dx.png
:align: center
**JUMPER CONNECTIONS FOR I2C**
```
To modify the example to use main/wakeup domain I2C, refer Accessing main and wakeup domain peripherals from MCU domain
Supported Combinations
Parameter |
Value |
|---|---|
CPU + OS |
a53ss0-0 nortos |
CPU + OS |
a53ss0-0 freertos |
CPU + OS |
c75ss0-0 freertos |
CPU + OS |
mcu-r5fss0-0 nortos |
CPU + OS |
mcu-r5fss0-0 freertos |
Toolchain |
ti-arm-clang |
Toolchain |
arm.gnu.aarch64-none |
Toolchain |
ti-c7000 |
Board |
am62dx-evm |
Example folder |
examples/drivers/i2c/i2c_read |
Steps to Run the Example
When using CCS projects to build, import the CCS project for the required combination and build it using the CCS project menu (see Using SDK with CCS Projects).
When using makefiles to build, note the required combination and build using make command (see Using SDK with Makefiles)
Launch a CCS debug session and run the executable, see CCS Launch, Load and Run
See Also
Sample Output
Shown below is a sample output when the application is run,
[I2C] Read data ... !!!
[I2C] Sample 0: 255
[I2C] Sample 1: 255
[I2C] Sample 2: 255
[I2C] Sample 3: 255
[I2C] Sample 4: 255
[I2C] Sample 5: 255
[I2C] Sample 6: 255
[I2C] Sample 7: 255
[I2C] Sample 8: 255
[I2C] Sample 9: 255
[I2C] Sample 10: 255
[I2C] Sample 11: 255
[I2C] Sample 12: 255
[I2C] Sample 13: 255
[I2C] Sample 14: 255
[I2C] Sample 15: 255
[I2C] Sample 16: 255
[I2C] Sample 17: 255
[I2C] Sample 18: 255
[I2C] Sample 19: 255
[I2C] Read data ... DONE !!!All tests have passed!!