Skip to main content
TKlei.1
Associate
August 8, 2018
Question

I2C Issue

  • August 8, 2018
  • 2 replies
  • 601 views

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

This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
August 8, 2018

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
TKlei.1
TKlei.1Author
Associate
August 12, 2018

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