cancel
Showing results for 
Search instead for 
Did you mean: 

Is this a HAL IIC bug?

Junde
Senior III

Hi there,

I drove 4 SHT4x by STM32G473VE and used the HAL_I2C_Master_Transmit() and HAL_I2C_Master_Receive() to write and read the sensors.

Normally, everything is well.

However, if I

  1. unplug the sensor;
  2. replug the sensor again;(Not the sensor maybe can NOT work normally)
  3. reset the MCU;

the program will probably run into  the following dead loop:

Junde_0-1736739151853.png

I don't know why this happened, and how I can recover from this error state.

Thank you!

 

0 REPLIES 0