stm32l4xx_hal_driver
stm32l4xx_hal_driver copied to clipboard
HAL_I2C_IsDeviceReady broken since v1.13.5
Describe the set-up
- Custom board
- IAR 9.50.2
- stm32l4xx_hal_driver in v1.13.4 and v1.13.5
Describe the bug
Commit 0844cb8 introduces a check in I2C_WaitOnFlagUntilTimeout which in turn breaks timeout/wait functionality of HAL_I2C_IsDeviceReady. The problem was initially reported for H7 family and already fixed there.
Maybe consider a common library to overcome such issues in future?
How To Reproduce
- Indicate the global behavior of your application project
I tried to compile our code one time against v1.13.4 and afterwards against v1.13.5. Writing to an EEPROM I2C IC after the upgrade to v1.13.5 fails after the first page. We test if the EEPROM is ready using HAL_I2C_IsDeviceReady and since it is writing the first page at that point in time, it reports that it isn't ready yet when I try to send the second one. Unfortunately the library does not retry or wait the timeout we supplied using the parameters.
- The modules that you suspect to be the cause of the problem (Driver, BSP, MW ...)
HAL_I2C
- The use case that generates the problem
An I2C device which reports that it is not ready yet.
- How we can reproduce the problem
Take an evaluation board, connect an I2C EEPROM and test if HAL_I2C_IsDeviceReady can be used to wait for the EEPROM to finish writing using the trials/timeout parameters.
Additional context
Screenshots