I am using TM4C1294 to control several I2C devices, such as DAC, EEPROM, ADC, etc. My question is if the I2C bus hangs (SDA=0), what is the best way to recover the bus without power cycle? Is there any example code available?
Thanks,
Simon
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I am using TM4C1294 to control several I2C devices, such as DAC, EEPROM, ADC, etc. My question is if the I2C bus hangs (SDA=0), what is the best way to recover the bus without power cycle? Is there any example code available?
Thanks,
Simon
Hollo Amit,
Thank you very much for your quick reply.
The bus is being held by an external slave for sure.
I heard about the IO toggle a little bit . Would you please advise that how to implement it on TM4C129X device?
Best Regards,
Simon
May I "second" Amit's identification of, "multiple/excess" SCL clocking to (usually) free a "hung" I2C slave.
We've found this mechanism to most always work - unless the separation between master & slave is great - pull-ups are too weak - or power @ the slave is marginal.
While adding a "GPIO driven FET" can reset the slave - loss of that GPIO may be avoided... (at the cost of small added circuitry @ the slave)
Our firm has developed a proprietary device which is able to recognize an input clock's narrow frequency band - which when maintained for a specified duration - will generate an adjustable "one-shot" power removal from a remote (connected) device. This saves the cost & routing of a (usual) long, added GPIO signal run & powering FET & gate circuitry. Our device is entirely MCU & IC agnostic - presently may source up to 5V @ 100mA.
You may be able to implement such via an analog comparator configured to provide, "Frequency to Voltage" conversion - along with a proper, pulsed signal output...