-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lp timeout test fails on NUCLEO_L073RZ #9962
Comments
Internal Jira reference: https://jira.arm.com/browse/MBOCUSTRIA-948 |
cc @ARMmbed/team-st-mcd |
This issue is seen with RTC when compiled with ARM_GCC. The device time reported by the board is less than the actual time, showing that it probably ticks too slowly:
It seems RTC is much less accurate than LPTIM, and (with RTC used) the device time narrows falls on the 5% error range. The difference produced by GNU and ARM compilers is fairly small (though noticeable). The follow commit changed the wakeup timer from LPTIM to RTC: commit 4bead92
Locally reverting the commit above makes the test pass, though as its commit message suggests, it's intended to address another bug. |
The failure is down to the high latency of RTC-based lp_ticker. "Timing drift" test works by attaching itself to Ticker with perioud = 10000us (10ms), incrementing a counter once Ticker calls back, attaching again, ... (repeating thousands of times). At the end, calculate time = counter * period. If we increase the period (of each call) by 10x (to 100ms), the test passes with very precise timing. We infer that Ticker has good timing but the latency is high and accumulates to produce a noticeable time shift. I estimate the latency to be ~300us (0.3 ms) per call in the following way:
|
Should be solved by #10701 |
👍 |
Description
Tested on two different boards.
Issue request type
The text was updated successfully, but these errors were encountered: