Closed didi1357 closed 3 months ago
Hello @didi1357,
Thank you for the report. As you said, it's detected on H7 and fixed, also internally fixed on L4. It's a matter of updating on L4.
With regards,
ST Internal Reference: 181377
The change that's checked in for the H7 does not seem to make sense with respect to the new local variable "status". "Status" is set in several places, but it is not returned and it does not seem to affect the logic. The only use of "status" that I can see is in the comparison on line 3370, where it is compared to HAL_ERROR and reset to HAL_OK if the current number of trials is less than the maximum number of trials. But this doesn't affect anything because "status" isn't used anywhere else. Am I missing something?
Fixed in commit : d98b0721c4ab37985758d19a849471ed50b8594d
Describe the set-up
Describe the bug Commit 0844cb8 introduces a check in
I2C_WaitOnFlagUntilTimeout
which in turn breaks timeout/wait functionality ofHAL_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
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.
HAL_I2C
An I2C device which reports that it is not ready yet.
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