cancel
Showing results for 
Search instead for 
Did you mean: 

I2C Issue

TKlei.1
Associate

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

2 REPLIES 2

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.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
TKlei.1
Associate

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