Question
I2C bug in CubeMX 5.0.1?
In my code I use I2C. But when I reset the MCU with my debugger (I-jet from IAR) the I2C peripheral indicates BUSY as soon as it is initialized by the MX_I2C1_Init() function.
But if I add the following I2C reset in the MX_I2C1_Init() function before the HAL_I2C_Init(&hi2c1) the BUSY flag is cleared:
I2C1->CR1 |= I2C_CR1_SWRST;
I2C1->CR1 &= ~I2C_CR1_SWRST;Is this a CubeMX bug?