AnsweredAssumed Answered

I2C error recovery

Question asked by Mikk Leini on Aug 24, 2013

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) ?