ST-Link starts firmware and aborts it while downloading
Hello,
I am using STM32CubeIDe V1.10.0.
my project is structured as follows:
-CubeMX inits
-HAL_I2C_IsDeviceReady
-HAL_I2C_Mem_Read //Read a large amount from an I2C EEPROM
-while(1)
I have now done a lot of troubleshooting to understand why HAL_I2C_IsDeviceReady very often returns HAL_BUSY.
The problem is that when debugging, the ST-Link restarts the program and then breaks. This interrupts the I2C communication. If SDA is low at this point (because the external EEPROM is pulling the SDA low) the i2c can never be used again. It is always HAL_BUSY.
Only when power is removed will the I2C be re-enabled.
When clicking on "Debug", the ST-Link must not restart the software and interrupt it in an undefined manner.
The J-Link does not have this problem. As a result, the I2C never hangs up here.
