cpu/stm32l1: optimize power consumption#11832
Merged
aabadie merged 1 commit intoRIOT-OS:masterfrom Aug 6, 2019
Merged
Conversation
- With this PR all GPIOs are set as AIN on start up. Co-authored-by: Oleg Artamonov <oleg@unwds.com>
1ce0eb1 to
3cd7244
Compare
aabadie
approved these changes
Aug 5, 2019
Contributor
aabadie
left a comment
There was a problem hiding this comment.
Tested power consumption on nucleo-l152re and confirm the (huge) improvement.
Code changes are good. ACK
Contributor
|
Forgot to merge this one yesterday. |
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 is based on previous work in #8403 & #10052. On start-up it configures all GPIO's as AIN.
On other boards of the STM32 family (L0 & L4) this is done by default. In #11758 this was done for STM32F0-7, with #11830 that solves #11820, it can now be done for STM32L1.
As stated in this AN, doing this saves the consumption of the input Schmitt trigger. The only case where this shouldn't be done is when the pin is connected to an external driver that has a pull-up or pull-down setting, this should be handled by pertinent drivers.
Testing procedure
Supply voltage for all the below measurement was 3.3V. ASupply was measured directly threw the IDD pin either with a multi meter or NUCLEO-LPM01A power measurement extension.
As of know when entering STOP mode consumption on stm32l1 is around 500uA, with this PR it drops to 1.5uA (datasheet typ 1.4uA for l152re). To test run:
make BOARD=nucleo-l152re -C tests/periph_pm/ flashIssues/PRs references
Depends on #11830 and #11489
Closes #11359 & #10052