Question
handle I2C bus error
Posted on March 03, 2017 at 07:45
I have a problem with the i2c peripherie of a STM32f407.
If i get a bus error the i2c is always busy.
I try to solve this with a I2C_SoftwareResetCmd(I2C1, ENABLE), this works but then i cant start a new communication.I use the standard libary.
if(I2C_GetITStatus(I2C1,I2C_IT_BERR))
{ I2C_ClearITPendingBit(I2C1,I2C_IT_BERR); I2C_GenerateSTOP(I2C1, ENABLE); I2C_SoftwareResetCmd(I2C1, ENABLE); }#stm32f407 #i2c