I2C broken line problem in DAVE 4 (how to detect missing slave?)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hi folks,

Configuring with DAVE4 I2C_MASTER then porting to Keil-MDK I have successfully run the I2C-read/-write with a sensor.

But as I broken the connection between the board CPU_45A-V3 and the sensor, the I2C communication runs in an endless loop.
It seems similar to the phenomena andersr once has. (Thread: XMC4500, I2C002 FIFO issue)

I have supposed when the CPU as master sent message out and the sensor as slave was not on the bus, there will be no ACK present on the line SDA.
This (non ACK) should be interpreted as NACK and the call back function of nack received is then called in CPU (master).
With this indication the FMR.MTDV will be set to 10B by my error-handling procedure.
But nor the call back of nack received is called either the call back for error detected.

Does someone have idea/experience to handle such HW error conditions (e.g. missing slave) ?

Many thanks for any help in advance!
0 Likes
1 Reply
Not applicable
Hi,

You can enable the non-acknowledge received interrupt. Take a look on DAVE v3 example "I2C001_Example1" which checks the slave device connected to the master device.

BR,
Zain
0 Likes