STMicroelectronics / STM32CubeL4

STM32Cube MCU Full Package for the STM32L4 series - (HAL + LL Drivers, CMSIS Core, CMSIS Device, MW libraries plus a set of Projects running on all boards provided by ST (Nucleo, Evaluation and Discovery Kits))
Other
259 stars 151 forks source link

Infinite loop inside I2C_IsErrorOccurred #79

Closed alvarop closed 1 year ago

alvarop commented 1 year ago

Inside I2C_IsErrorOccurred, if I2C_FLAG_STOPF is never cleared, the timeout will never occur, since the error doesn't break out of the loop. https://github.com/STMicroelectronics/STM32CubeL4/blob/26be59071141d07a1d0dddb58b9fb335b027cbaa/Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c#L6855-L6869

The bug has already been fixed in the stm32l4xx_hal_driver repo, but is still present in this one. https://github.com/STMicroelectronics/stm32l4xx_hal_driver/commit/8296070fbc62bc127835af593950e88c495dbde6

HBOSTM commented 1 year ago

Hello @alvarop

The bug has already been fixed in the stm32l4xx_hal_driver repository, and it will be fixed in the STM32CubeL4 in the next release. So, please allow me then to close this issue and thank you for your contribution.

Best Regards