Skip to main content
cballard
Associate
February 3, 2010
Question

STM32 I2C Lock-Up

  • February 3, 2010
  • 6 replies
  • 3114 views
Posted on February 03, 2010 at 20:11

STM32 I2C Lock-Up

#send-i2c-stop-to-unlock-slave
This topic has been closed for replies.

6 replies

cballard
cballardAuthor
Associate
May 17, 2011
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! :)

Tesla DeLorean
Guru
May 17, 2011
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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
nanayakkaraan
Associate III
May 17, 2011
Posted on May 17, 2011 at 13:38

''bit-banging manually''

Can you kindly explain how to do this?

Tesla DeLorean
Guru
May 17, 2011
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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
Tesla DeLorean
Guru
May 17, 2011
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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
samuel239955_st
Visitor II
July 17, 2012
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 ?