Skip to main content
Mikk Leini
Senior
August 24, 2013
Question

I2C error recovery

  • August 24, 2013
  • 1 reply
  • 983 views
Posted on August 24, 2013 at 12:05

Hello,

I'm trying to make the STM32L152  I2C communication failure-proof against glitches/short-circuits. There's an API command I2C_SoftwareResetCmd which seems to be the cure, but i can't find any proper example or manual of how to use it. I tried this way:

1. Detect timeout of any flag/event checking loop.

2. SW reset enable

3. Clear all I2C flags

3. SW reset disable.

But this doesn't have any effect.

When i deliberately short-circuit SCL or SDA then they go high after short-circuit so bus seems to be ok and there shouldn't be a need for ''clocking out''. Yet, the I2C_GenerateSTART does not work after short-circuit and recovery method i use.

Does anybody know the proper way (other than re-initalizing the peripheral completely) ?

#stm32l152-i2c-recovery
This topic has been closed for replies.

1 reply

toroid
Explorer II
July 20, 2023