cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 - Reinitializing I2C driver

gkovelman
Associate II
Posted on September 07, 2016 at 09:41

Hi,

I'm trying to deinit and then init the I2C driver during runtime of the STM32F411.

I2C1 generally works when initializing the drivers once, but when I deinit and then init them, I get a start-bit timeout - the logic analyzer shows that nothing changes on the SDA/SCL lines after the re-initialization.

I'm using the HAL drivers generated by the STM32CubeMX. To deinit, I'm using HAL_I2C_MspDeInit. To init, I'm using MX_I2C1_Init.

Any suggestion on this problem?

Best regards.
1 REPLY 1
gkovelman
Associate II
Posted on September 07, 2016 at 09:56

Disregard this issue - I should have used HAL_I2C_DeInit and not HAL_I2C_MspDeInit.