F411 I2C Recover from Error
I have my own F411 PCB board, on which there are a few devices that MCU/F411 uses I2C1 (I2C HAL) to communicate.
Sometimes I2C HAL API (HAL_I2C_Mem_Read, HAL_I2C_Master_Transmit, HAL_I2C_Master_Receive) calls may return with error: most of the time error code is 32, timeout. My problem is once the error occurs, it is there persistently. I have to power on/off the board to get rid of it.
Is there a clear step by step guide on how to software-reset I2C state so that my firmware can recover nicely from that error?
I have to admit: there may be hardware issue that causes the problem, which we need to resolve.
