Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use more efficient mode for STM32L4XX stop mode#1097

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fpistm merged 8 commits intostm32duino:masterfromangelnu:master
Jul 3, 2020
Merged

Use more efficient mode for STM32L4XX stop mode#1097

fpistm merged 8 commits intostm32duino:masterfromangelnu:master
Jul 3, 2020

Conversation

angelnu
Copy link
Contributor

@angelnuangelnu commentedJun 12, 2020
edited
Loading

Summary

This PR fixes/implements the followingbugs/features

  • Feature 1 - save power in stop mode for STM32L4XX devices
  • Feature 2 - Use MSI as wake up clock when available
  • Breaking changes

Feature 1
Currently the low power library uses HAL_PWR_EnterSTOPMode for all devices. This does not leverage the stop2 mode which is available in the STM32L4XX. This results in 4,6 uA instead of 1,35 uA in my nucleo_l412kb.

Stop1 is only required when the UART device needs to wake up. So when not used the patch calls HAL_PWREx_EnterSTOP2Mode directly.

Feature 2
When available use the MSI as wake up clock. This avoids starting the HSI which generates a short spike of ca 300 uA until the SystemClock_ConfigFromStop is called.

Validation

  • Ensure CI build is passed.
  • Demonstrate the code is solid. [e.g. Provide a sketch]

Not adding a new sketch since no external APIs are changed by this patch.

Code formatting

  • Ensure AStyle check is passed thanks CI

Closing issues
NA

@fpistm
Copy link
Member

Hi@angelnu
as you know I'm currently working on the SubSeconds managements and I'm studying to move the low power driver to the Low Power library. Anyway, I have to study the impact of the mode you propose.

@angelnu
Copy link
ContributorAuthor

Jep, I know (looking forward to it) :-)

This patch is independent from the sleep time. I made it specific for the STM32L4 since this is the only device I have that supports STOP2. It would be nice if there would be a define for all platforms with STOP2...

I hope I can get the style check to agree so the patch is ready. If you have any other feedback you would like to get here please let me know.

@fpistmfpistm added the enhancementNew feature or request labelJul 3, 2020
@fpistmfpistm added this to the2.0.0 milestoneJul 3, 2020
@fpistmfpistm merged commit348fdc4 intostm32duino:masterJul 3, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fpistmfpistmfpistm approved these changes

Assignees
No one assigned
Labels
enhancementNew feature or request
Projects
None yet
Milestone
2.0.0
Development

Successfully merging this pull request may close these issues.

2 participants
@angelnu@fpistm

[8]ページ先頭

©2009-2025 Movatter.jp