Skip to content

Fix for issue #10725: disable lp-ticker for STM targets which uses RTC/LSI for lp-ticker #12210

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

Merged
merged 5 commits into from
Jan 24, 2020

Conversation

mprse
Copy link
Contributor

@mprse mprse commented Jan 8, 2020

Summary of changes

This PR is continuation of PR #12135 - which will be closed.

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 disable lp-ticker for STM targets which uses RTC/LSI to drive lp-ticker - LSI is unstable and breaks accuracy requirements for low power ticker.

Impact of changes

Migration actions required

Documentation


Pull request type

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[X] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers

@jeromecoutant


@ciarmcom
Copy link
Member

ciarmcom commented Jan 8, 2020

@mprse, thank you for your changes.
@jeromecoutant @ARMmbed/mbed-os-maintainers please review.

@jeromecoutant
Copy link
Collaborator

Should be approved by UBLOX team

@0xc0170 0xc0170 requested a review from a team January 8, 2020 10:45
@0xc0170
Copy link
Contributor

0xc0170 commented Jan 8, 2020

@ARMmbed/team-ublox Please review

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming there is no fallback option for these targets. @ARMmbed/team-ublox to confirm.

@fahimalavi
Copy link
Contributor

  1. Several of C030 targets has LSE available(including C030-U201 and C030-R412M). Why don't you use LSE instead disabling for all C030s ?
  2. We know some users who are using LPTicker and LSE using C030.

@mprse
Copy link
Contributor Author

mprse commented Jan 8, 2020

@fahim-ublox If there is another better solution that can be used then let's use it.

This solution was agreed in PR #12135 and the problem was analyzed in the following issue #10725 (comment).

Can you provide some details on how to use LSE on UBLOX target? Simply remove "overrides": { "lse_available": 0 } from targets.json?

@mprse
Copy link
Contributor Author

mprse commented Jan 9, 2020

@fahim-ublox Can you review?

I enabled lp-ticker driven by LSE for UBLOX C030 family. Tested this locally and on RAAS (where some problems with the lp-timer test were detected). In both cases test is passing regularly.

@fahimalavi
Copy link
Contributor

There are some old C030 board those have no LSE available. So to keep them happy as well idea was to keep LSE available to zero in target.json and override in platform tests json or relevant applications. i.e.
We are using something like
echo {"target_overrides": {"*": {"lwip.ppp-enabled": true, "target.lse_available": 1}}}>mbed_app.json

@mprse
Copy link
Contributor Author

mprse commented Jan 9, 2020

There are some old C030 board those have no LSE available. So to keep them happy as well idea was to keep LSE available to zero in target.json and override in platform tests json or relevant applications.

Can you provide for which targets LSE can be enabled?

@fahimalavi
Copy link
Contributor

I checked locally the boards you should have come from the first production run so if your boards support an external oscillator then any of the ones that could get to a customer will also support it. So we think if you marked lse available, it’s probably fine.

@mprse
Copy link
Contributor Author

mprse commented Jan 10, 2020

I checked locally the boards you should have come from the first production run so if your boards support an external oscillator then any of the ones that could get to a customer will also support it. So we think if you marked lse available, it’s probably fine.

Thank you @fahim-ublox .
If you are happy with the current version please pass the review.

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 10, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Jan 10, 2020

Test run: FAILED

Summary: 3 of 4 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-IAR
  • jenkins-ci/mbed-os-ci_build-GCC_ARM

@mprse
Copy link
Contributor Author

mprse commented Jan 13, 2020

Test run: FAILED

Disabled BLE feature for targets without lp-ticker.

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 13, 2020

@mprse I don't see any new commit here, should it be?

@mprse
Copy link
Contributor Author

mprse commented Jan 13, 2020

@mprse I don't see any new commit here, should it be?

Thanks @0xc0170 . Something went wrong while pushing. It should be good now.

@jeromecoutant
Copy link
Collaborator

Disabled BLE feature for targets without lp-ticker.

Maybe this constraint should be added in BLE mbed_lib json ?

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 13, 2020

CI restarted

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 13, 2020

Disable comment should contain a reason for disabling. Please add, let CI to complete now to check the update.

@0xc0170 0xc0170 self-requested a review January 13, 2020 09:40
@mbed-ci
Copy link

mbed-ci commented Jan 20, 2020

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 3
Build artifacts

@mergify mergify bot dismissed stale reviews from 0xc0170 and adbridge January 21, 2020 08:11

Pull request has been modified.

@mprse
Copy link
Contributor Author

mprse commented Jan 21, 2020

I fixed the styling manually. Hopefully, it's ok now.

@bulislaw
Copy link
Member

Does it still needs work? It seems it was fixed.

@mprse
Copy link
Contributor Author

mprse commented Jan 21, 2020

It needs Ci.

@adbridge adbridge added needs: CI release-version: 6.0.0-alpha-2 Second pre-release version of 6.0.0 and removed needs: work labels Jan 22, 2020
@adbridge
Copy link
Contributor

CI started

@mbed-ci
Copy link

mbed-ci commented Jan 22, 2020

Test run: FAILED

Summary: 1 of 11 test jobs failed
Build number : 4
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_greentea-test

@mprse
Copy link
Contributor Author

mprse commented Jan 23, 2020

Test run: FAILED

@0xc0170 It looks like all passed.

@adbridge
Copy link
Contributor

Test run: FAILED

@0xc0170 It looks like all passed.

Looks like another CI hiccup. Will re-run the ci and hopefully it will work this time.

@adbridge adbridge requested a review from 0xc0170 January 23, 2020 12:22
@mbed-ci
Copy link

mbed-ci commented Jan 23, 2020

Test run: FAILED

Summary: 1 of 11 test jobs failed
Build number : 5
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_dynamic-memory-usage

@mprse
Copy link
Contributor Author

mprse commented Jan 23, 2020

Looks like another CI hiccup. Will re-run the ci and hopefully it will work this time.\

@adbridge
Now jenkins-ci/greentea-test passed, but jenkins-ci/dynamic-memory-usage failed 😢 .

@adbridge
Copy link
Contributor

Will try running again although interestingly another PR failed the dynamic-memory-usage as well earlier so there may be a problem

@adbridge
Copy link
Contributor

CI started

@mbed-ci
Copy link

mbed-ci commented Jan 23, 2020

Test run: FAILED

Summary: 1 of 11 test jobs failed
Build number : 6
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_dynamic-memory-usage

@adbridge adbridge merged commit 6e762a2 into ARMmbed:master Jan 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-version: 6.0.0-alpha-2 Second pre-release version of 6.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants