Hi all,
I have a problem with K22 and I2C communication.
I am using K22 as master in a I2C bus with two sensors (both are slaves). I am using KSDK_MK22FA12 v2.3 and I2C blocking.
My problem is that, after some hours (or days) running propperly, the I2C fails, the watch dog is activated and the K22 reboots. The problem is that the SDA lines go LOW when K22 is trying to read data from the slave (you can see the image when the problem occurs, when the SDA line is LOW). This occurs in the execution of I2C_MasterTransferBlocking.
I have tried to delimit the problem removing one of the sensor from the bus, but the problem remains. The difference is that the K22 is more time runnning propperly, but, finally, the problem appears.
More information:
- K22 reads the data from the sensor each 30 ms.
- The sensor is si1153 (proximity and luminosity).
- I am not sure because this kind of test are very long, but I think that, if I compile without NDEBUG symbol, the problem disappears.
Does anyone know something?
Thanks!