cpu/stm32l4: add STOP and STANDBY low-power modes#11173
Closed
aabadie wants to merge 2 commits intoRIOT-OS:masterfrom
Closed
cpu/stm32l4: add STOP and STANDBY low-power modes#11173aabadie wants to merge 2 commits intoRIOT-OS:masterfrom
aabadie wants to merge 2 commits intoRIOT-OS:masterfrom
Conversation
aabadie
commented
Mar 14, 2019
Contributor
Author
aabadie
left a comment
There was a problem hiding this comment.
I tested this PR on nucleo-f091rc and STOP mode works although consumption see quite high (~2mA instead of 7 in normal run mode). By default, the STANDBY mode doesn't work because all wakeup pins are enabled which causes troubles.
This is why I don't like the current default behaviour with wake-up pins. See my comment below.
Contributor
Author
|
I mixed up this one with #9521 and posted my review on the wrong one... |
Contributor
Author
|
For simplicity, this PR is now based on #9521. |
This was referenced Mar 14, 2019
Contributor
Author
|
Rebased now that #9521 is merged. I need to re-test it again though. |
Contributor
Author
|
Re-tested this PR on nucleo-l476rg, nucleo-f446re and nucleo-l073rz. All good. @vincent-d, do you have any comment on this one ? |
Contributor
Author
|
closing in favor of #11211. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
This PR adds STOP and STANDBY low-power modes to stm32l4 MCU family. There are 3 levels of STOP modes for L4, this PR uses STOP1 because I found less constraint (more peripherals can be used during this mode). Even if possible, the SRAM2 retention is disabled during standby mode.
On a nucleo-l433rc or nucleo-l476rg, I got the following consumption results:
For standby mode, the wake-up pins are disabled because when enabling them, there's an important consumption increase (around 300uA). On the l4 boards I have, except l496zg, one of the wake-up pin (PA2) in connected to the stdio UART: this crashes the cpus when entering standby mode and this wake-up pin is enabled.
Testing procedure
tests/periph_pmon a nucleo-l476rgYou should see a drop of consumption from 3.8mA to 0.5uA. After 5 seconds, the board reboots.
You should see a drop of consumption from 3.8mA to 8.5uA
Issues/PRs references
None