-
Notifications
You must be signed in to change notification settings - Fork 3k
Fix for issue #10725 (tests-mbed_drivers-lp_timer failing nightly) #12135
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
Conversation
…tly) tests-mbed_drivers-lp_timer is failing on UBLOX_C030_U201 (can't reproduce the failure locally). According to the documentation of STM32F437VG76 MCU: The LSI RC acts as an low-power clock source that can be kept running in Stop and Standby mode for the independent watchdog (IWDG) and Auto-wakeup unit (AWU). The clock frequency is around 32 kHz. For more details, refer to the electrical characteristics section of the datasheets. It seems that typical LSI frequency is 32 kHz, but it may vary from 17 to 47 kHz! This means that lp-timer test may fail on the same board because lp-ticker frequency is unstable. The proposition is to add ticker_update_freq() function and modify the test to perform lp-ticker calibration if the target uses LSI RC for lp-ticker.
@mprse, thank you for your changes. |
@mprse could you please fill in the template correctly? Ie put your description etc under the right headings |
Fixed. |
@ARMmbed/mbed-os-hal Please review this fix for the failing More details and analysis can be found here: Issue #10725 (comment). Line 84 in 789a193
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks to me like fixing tests by changing the public API, which doesn't seem like a something we should be doing. Is this issue specific to tests? If not how users of the LP ticker will benefit?
This is more like changing the public API to handle STM hardware limitation ( mbed-os/targets/TARGET_STM/lp_ticker.c Lines 516 to 523 in 5f495db
It applies to all STM targets which are using
Currently, |
Should that be done in init? @ARMmbed/team-st-mcd fyi |
I was thinking about this, but calibration takes at least one second. Alternatively, we can add a field like |
I would also do the calibration in the init (taking a note there it might take longer). Otherwise LSI is not ideal for lp ticker (breaking the requirements), thus disabling its use in lp ticker. @ARMmbed/team-st-mcd Please review |
I agree, I think we could disable LP_TICKER when LSE is not available |
Can I assume that the conclusion is that this PR should be closed and I should create a new PR that disables @jeromecoutant Is it an easy way to check for which devices EDIT:
|
LSE and LPTICKER are enabled at STM32 FAMILY level, so each time a target is disabling LSE: You should disable LPTICKER: |
@jeromecoutant One more question. What with boards that have:
So |
Created PR #12210 to solve this issue as we agreed (disable This PR will be closed. |
OK I think it could be a good patch if during init, |
Summary of changes
tests-mbed_drivers-lp_timer
is failing onUBLOX_C030_U201
(can't reproduce the failure locally).According to the documentation of
STM32F437VG76
MCU:The LSI RC acts as an low-power clock source that can be kept running in Stop and
Standby mode for the independent watchdog (IWDG) and Auto-wakeup unit (AWU). The
clock frequency is around 32 kHz. For more details, refer to the electrical characteristics
section of the datasheets.
It seems that typical LSI frequency is 32 kHz, but it may vary from 17 to 47 kHz!
This means that lp-timer test may fail on the same board because lp-ticker frequency is unstable.
The proposition is to add
ticker_update_freq()
function and modify the test to perform lp-ticker calibration if the target uses LSI RC for lp-ticker.Impact of changes
Migration actions required
Documentation
Pull request type
Test results
Reviewers