Currently calculated timout is rounded down on STM devices, but in this test:
https://github.com/ARMmbed/mbed-os/blob/431c4c19ae2056785c85e2a119ed51dd35f79f3c/TESTS/mbed_drivers/watchdog/main.cpp#L223-L230
It is checked if calculated is bigger or equal to the value passed via init function. This test passes for most of the targets, because of their LSI frequency value which after division throgh it gives good integer value so that reload value can be calculated without any rounding. But not in the case of STM32-L0xx boards where the LSI frequency value is set to 37 kHz.
So should we change the test so we accept rounding down, or should we round the values up (if it doesn't exceed the upper limit of timeout)?
@maciejbocianski @mprse @fkjagodzinski @jamesbeyond
[ ] Question
[ ] Enhancement
[x] Bug
Internal Jira reference: https://jira.arm.com/browse/MBOCUSTRIA-1579
So should we change the test so we accept rounding down, or should we round the values up (if it doesn't exceed the upper limit of timeout)?
The test verifies our timing requirements for watchdog timeout. Has to stay as it is. It is the implementation, that has to be updated, if it doesn't comply with requirements.
cc @ARMmbed/team-st-mcd
Issue confirmed, you can st st device label
Tested, it fixes the issue. Closing.