2018-08-08 11:10 AM
Hello,
I am using the STM32L152VET6 MCU.
Once in a while the I2C peripheral crush. After resetting the MCU, the I2C works fine.
Any explanation? Does it a known issue?
Thanks,
Tomer
2018-08-08 11:15 AM
I2C can be flaky. If the external device gets into an odd state you might need to clock it out as there is usually not an asynchronous reset method.
You should be able to deinit/init the I2C peripheral provided the external device isn't clamping SDA or SCL low.
Add some retry/recovery code to your implementation.
2018-08-12 04:39 AM
Thanks.
We are doing this in our code (recovery) and then it works fine 'till the next time (happens once in a while).
Regards,
Tomer