A bug in the HAL_I2C_IsDeviceReady function in version 1.11.3 #289
Labels
bug
Something isn't working
hal
HAL-LL driver-related issue or pull-request.
i2c
I2C-related issue or pull-request
internal bug tracker
Issue confirmed and reported into a ticket in the internal bug tracking system
Projects
I have found a bug in the HAL_I2C_IsDeviceReady function in version 1.11.3 fec141c.
The problem is in the function HAL_I2C_IsDeviceReady on Line 3332. There is a call to the I2C_WaitOnFlagUntilTimeout function . There is a new test for I2C_IsErrorOccurred and if so (the device is not ready and sent NACK), I2C_IsErrorOccurred waits for STOP and returns HAL_ERROR to I2C_WaitOnFlagUntilTimeout. I2C_WaitOnFlagUntilTimeout returns HAL_ERROR to HAL_I2C_IsDeviceReady and it immediately returns HAL_ERROR to the upcoming function without considering the number of Trials from the function parameter.
How To Reproduce
Version 1.11.2 - multiple attempts to test if the device is ready (not busy)
Version 1.11.3 - only one attempt testing if the device is ready (not busy)
The text was updated successfully, but these errors were encountered: