2026-01-22 4:01 AM
When using the STM32H743ZI Nucleo board as the I²C master and two STM32 Blue Pill boards as I²C slaves with different addresses, the master requests data from the slaves and the slaves respond accordingly. However, I²C communication is unreliable during initial startup, and intermittent I²C errors are observed during runtime.
Is there anyone to help me with this issue.
Thank you.
2026-02-02 6:47 AM
@Gopika wrote:I observed that the SCL and SDA lines suddenly go high
> The idle state of both lines is high.
The "Z" state (high-impedance) would be as well, due to the pull- ups.
If this is related to the problem, you can configure a post-trigger with your scope, i.e. configure it to stop recording when this condition is detected.
2026-02-02 7:03 AM
Indeed.
@Gopika So, more precisely, I should say that the default state of the drivers is hi-Z; with the (mandatory) pullups, that makes the line state default to high.
2026-02-02 5:02 PM
You haven't indicated what external pull-up resistors you've used?
2026-02-02 8:31 PM
In my setup, I am using a 4.7 kΩ pull-up resistor.
2026-02-02 8:40 PM
During runtime, the SCL and SDA lines go high and communication stops. What is the recommended method to recover the I²C bus and continue communication?
2026-02-02 8:43 PM
During runtime, the scl and sda lines go high and communication stops. What is the recommended method to recover the I²C bus and continue communication?
2026-02-02 8:57 PM
@Gopika wrote:During runtime, the SCL and SDA lines go high and communication stops. What is the recommended method to recover the I²C bus and continue communication?
Did you check the ErrorCode in the I2C instance? You haven't indicated which I2C you're using so let's assume its hi2c1. Run the debugger and view the hi2c1 variable and look at the ErrorCode member to see what it is reporting.
Or you can see if the HAL_I2C_ErrorCallback is called. If so, then just get the error code by calling HAL_I2C_GetError and see what value it returns.
2026-02-03 1:08 AM
@Gopika ,
As I have a doubt about these Blue pill boards (as I said previously), you may better start using two instances of I2C on stm32H743zi Nucleo board and discard the Blue Pill boards for the moment. At least you will validate one part of the hardware and the software.