AM263Px MCU+ SDK: I2C Slave Transfer

| AM263Px MCU+ SDK 26.00.00 |

I2C Slave Transfer

# Introduction

This example shows Master Slave Communication between Two I2C instances.

One of the core is in control of the I2C Master instance and the other core is in control of the I2C Slave instance.

The main core in in control of the Master I2C Instance. The remote cores in in control of the Slave I2C Instance.

Two transactions are carried out in this example.

In the first transaction the Master Reads two bytes from slave in Blocking Mode. In the second transaction the Master Writes two bytes to slave in Blocking Mode.

Attention
  This Example requires two I2C instances to be connected together.

SCL and SDA pins of I2C1 and I2C3 are available on the LP board. I2C1 can be connected to I2C3 with following jumper Connections.

- Connect Pin 9 of J1 (I2C1_SCL) to Pin 49 of J5 (I2C3_SCL).
- Connect Pin 10 of J1 (I2C1_SDA) to Pin 50 of J5 (I2C3_SDA).

# Supported Combinations

Parameter | Value
--- | ---
CPU + OS | r5fss0-0 freertos
r5fss0-1 nortos
Toolchain | ti-arm-clang
Boards | am263px-lp
Example folder | examples/drivers/i2c/i2c_slave_transfer

# Steps to Run the Example

Note
  This is a `system` or multi-core project, so refer to system project build instructions for CCS project or makefiles whenbuilding 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

I2C

# Sample Output

Shown below is a sample output when the application is run,

[I2C SLAVE] I2C Master Slave Transaction Started ... !!!
[I2C MASTER] I2C Master Slave Transaction Started ... !!!
[I2C MASTER] Received Data 3 4 !!!
[I2C SLAVE] Transmitted Data 3 4 !!!
[I2C SLAVE] Received Data 1 2 !!!
[I2C MASTER] Transmitted Data 1 2 !!!
[I2C SLAVE] Transaction Complete !!!
[I2C MASTER] Transaction Complete !!!
All tests have passed!!