I have a design that has an AXI I2C Master which controls a few peripherals on a daughter board through the PMOD connector on a ZCU102, one of which is a TMP116 temperature sensor.
This daughter board is optional in my application, so sometimes these peripherals will not be present on the I2C line.
My bare-metal software driver for the AXI-I2C driver however will stall during an I2C read if the peripherals are not present.
Below is a code sample of how I am currently using the bare metal Xilinx drivers to do an I2C read.
unsigned iic_read(u8 device_address, u8 *read_buffer, u16 byte_count)
volatile unsigned num_bytes_recv = XIic_Recv( IIC_APD_BASE_ADDRESS,
Is there a way to find out, without hanging, if an I2C slave is present using the AXI I2C IP? My plan would be to check if a slave is present before doing reads, and return an error value if the slave is not present.
Thanks in advance!