cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 I2C Lock-Up

cballard
Associate II
Posted on February 03, 2010 at 20:11

STM32 I2C Lock-Up

#send-i2c-stop-to-unlock-slave
6 REPLIES 6
Posted on May 17, 2011 at 13:38

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.

-Clive

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
cballard
Associate II
Posted on May 17, 2011 at 13:38

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! :)

Posted on May 17, 2011 at 13:38

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.

-Clive

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
nanayakkaraan
Associate II
Posted on May 17, 2011 at 13:38

''bit-banging manually''

Can you kindly explain how to do this?

Posted on May 17, 2011 at 13:38

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.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
samuel239955_st
Associate II
Posted on July 17, 2012 at 09:12

If the slave lock up, can the STM32 master send ''I2C STOP'' condition to reset the slave ?