cancel
Showing results for 
Search instead for 
Did you mean: 

ESP32-S3 I2C Recovery: Unstuck Slave Holding SCL Low & Reinit I2C Without Reset

RAHIL
Associate II

Modular Switch Board Features:-

The ESP32-S3 acts as a master module to drive the STM32 G031K8 slave slots.
Slave slots can be plugged into the switchboard frame.
The master and slave communicate over the I2C bus.
The master controls the I2C slave slots by sending commands over I2C frames.
The master always remains powered on.
Both the master and slaves are powered by a common 3.3V supply.
Slaves are mobile and can be plugged in or unplugged from the slots.
Commands are sent to the master via a BLE app when a slave is inserted into a slot to initiate communication over I2C.

Problem Statement:-

Sometimes, a slave gets stuck on the I2C line.
The slave holds the I2C line low, causing clock stretching.
The master becomes unable to communicate, even after being reset using a dedicated reset button.

I have a screenshot from a logic analyzer showing that my first slave successfully commissioned and received the address 0x60(slave address). However, when I add a second slave(second slave address 0x01), the first slave starts holding the SCL line low. It reaches the 0x5F address, then 0x60, so I think the slave is holding the SCL line.

Currently , the code is only working when we reset that particular stucked slave controller which is not at all efficient solution.

Required Solution:-

A method to unbrick the I2C line by reinitializing I2C on the master side.
Alternative solutions to recover a stuck I2C line without requiring a hardware reset or power cycling.

Any help would be appreciated

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

Is this the same issue as

https://community.st.com/t5/stm32-mcus-products/i-c-bus-stuck-issue-stm32g0-slave-holding-scl-low-during-hot/td-p/779972

 

Duplicate? Colleagues?

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

3 REPLIES 3
TDK
Guru

Is this the same issue as

https://community.st.com/t5/stm32-mcus-products/i-c-bus-stuck-issue-stm32g0-slave-holding-scl-low-during-hot/td-p/779972

 

Duplicate? Colleagues?

If you feel a post has answered your question, please click "Accept as Solution".
RAHIL
Associate II

Well yes, both issues are same , as we are colleagues only .

In that case let's please keep it all in the same thread. No need to duplicate the effort.

If you feel a post has answered your question, please click "Accept as Solution".