Skip to content
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

STM32: LSE DRIVE feature update #13939

Merged
merged 1 commit into from
Nov 24, 2020
Merged

Conversation

jeromecoutant
Copy link
Collaborator

@jeromecoutant jeromecoutant commented Nov 20, 2020

Summary of changes

Hi

Got few regression after #13797 integration
(for example with hal-tests-tests-mbed_hal-rtc_reset)

I think we should never switch off LSE during target life (used for LPTICKER, RTC, ...)
Now the correct LSE DRIVE value is set once before starting LSE.

There was also an issue with the macro name in targets.json file

@JojoS62

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


@ciarmcom ciarmcom requested review from a team November 20, 2020 17:00
@ciarmcom
Copy link
Member

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

@JojoS62
Copy link
Contributor

JojoS62 commented Nov 20, 2020

thanks for fixing the macro name.

I have turned off LSE before changing the LSE drive setting, this is not possible when LSE is already running. It remains also running after an reset, the device needed a power down cycle to accept changing the register.
Maybe it is a better solution to skip changing the settings when LSE is already running, this should be possible by existing macros. Putting this code in mbed_overrides was the earliest stage I found where the LSE should not be enabled.

@jeromecoutant
Copy link
Collaborator Author

jeromecoutant commented Nov 20, 2020

When you plug the target, LSE is OFF, so LSE drive is applied.
Then, configuration is never lost

@JojoS62
Copy link
Contributor

JojoS62 commented Nov 20, 2020

but what happens when you press the reset button or use restart in the debugger? My experience was thas setting the LSE drive level failed in this case.

@jeromecoutant
Copy link
Collaborator Author

but what happens when you press the reset button or use restart in the debugger? My experience was thas setting the LSE drive level failed in this case.

No, LSE drive will not be updated with reset button or with the debugger.
This will work at target power on, or if local application swith off LSE before reset.

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 23, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Nov 23, 2020

Jenkins CI Test : ✔️ SUCCESS

Build Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-test ✔️
jenkins-ci/mbed-os-ci_dynamic-memory-usage ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️
jenkins-ci/mbed-os-ci_cloud-client-pytest ✔️

@0xc0170 0xc0170 added the release-type: patch Indentifies a PR as containing just a patch label Nov 23, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Nov 23, 2020

@jeromecoutant I fixed the PR type and tests , do not forget to fill in the template

@0xc0170 0xc0170 merged commit ced4aa6 into ARMmbed:master Nov 24, 2020
@mergify mergify bot removed the ready for merge label Nov 24, 2020
@jeromecoutant jeromecoutant deleted the PR_LSEDRIVE branch November 24, 2020 16:20
@mbedmain mbedmain added release-version: 6.6.0 Release-pending and removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants