AN 706: Routing HPS Peripheral Signals to the FPGA External Interface

ID 683659
Date 5/07/2018

1.3.2. I2C Test

The I2C interface can be tested using the following commands:

>i2cdetect -l
List the detected HPS I2C ports.
>i2cdetect -r 0
List the I2C slave devices connected to the HPS. "UU" is defined as device busy.
Figure 13.  i2cdetect Command Outputs
>i2cset -y 0 0x66 0x10 0x55
I2C0 writes the data value 0x55 to the data address 0x10 of slave device at 0x66. The command is written in the order: device address, data address, data value.
>i2cget -y 0 0x66 0x10
Return data value at address 0x10 of the device slave at address 0x66.
Figure 14.  i2cset and i2cget Commands
>i2cdump -y 0 0x66
Register data dump from 0x00 to 0xFF. "XX" is defined as a non-valid address.
Figure 15.  i2cdump Command Output