2010-02-03 11:11 AM
STM32 I2C Lock-Up
#send-i2c-stop-to-unlock-slave2011-05-17 04:38 AM
Classically if the slave devices are hung up you will need to clock them out, perhaps bit-banging manually on the I2C/GPIO pins, with the data pin floating high.
-Clive2011-05-17 04:38 AM
Thanks!
That appears to have worked... It's unfortunate there isn't a way to clock the chip out without ''faking'' a stop condition by bit-banging...but hey, it works! :)2011-05-17 04:38 AM
Yes, I2C devices are pretty dumb, the ones I worked on had very simple state machines, with minimal register/decode logic. Most of the I2C eeproms and such don't have an explicit reset, beyond power cycling, and resetting the host/master doesn't change the slaves. Also given most I2C parts clock from DC to 400 KHz there isn't a ''RESET'' state, so you basically have to do something to cause active parts to disassociate.
Glad it helped. -Clive2011-05-17 04:38 AM
''bit-banging manually''
Can you kindly explain how to do this?2011-05-17 04:38 AM
Can you kindly explain how to do this?
Set them us as GPIO pins (rather than attached to the I2C controller) and drive them high and low with writes to the GPIO pin, with calibrated delays between. There are some code examples on other threads.
2012-07-17 12:12 AM
If the slave lock up, can the STM32 master send ''I2C STOP'' condition to reset the slave ?