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

cpu/stm32l1: add stop and standby modes, adds pm_layered #11159

Merged
merged 2 commits into from
Mar 13, 2019

Conversation

fjmolinas
Copy link
Contributor

@fjmolinas fjmolinas commented Mar 12, 2019

Contribution description

This PR adds low power modes STOP and STANDBY for stm32l1 boards. Achieves 100uA on STOP mode. For lower power consumption GPIO must be switched to AIN on startup, this is left for a different PR (2uA with this addition but this is not done automatically in L1 when entering LPM, which L0 does).

Testing procedure

Connect a multimeter or other current measuring device on IDD pin on nucleo-l152re boards, then run:

make BOARD=nucleo-l152re -C tests/periph_pm/ PORT=/dev/ttyACM0 flash term

Unblock using rtc mode 0 and 1 to see effect on current measurement/consumption.

Issues/PRs references

Based on #8403, #7329, #10052

@kaspar030
Copy link
Contributor

Achieves 100mA on STOP mode.

is that milli or microamps?

@fjmolinas
Copy link
Contributor Author

@kaspar030 uA, sorry for the typo

@aabadie aabadie added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Platform: ARM Platform: This PR/issue effects ARM-based platforms Area: pm Area: (Low) power management CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Mar 12, 2019
@aabadie aabadie self-requested a review March 12, 2019 11:37
@aabadie
Copy link
Contributor

aabadie commented Mar 12, 2019

Using tests/periph_pm on a nucleo-l152re, I could test this PR and can confirm that low power can be reached with stm32l1. There are still problems with STANDBY mode: the board doesn't recover properly sometimes.

I'll also do some test on an L0 board, since this family is also affected by this change.

@aabadie
Copy link
Contributor

aabadie commented Mar 13, 2019

@fjmolinas, this needs rebase, now that #11167 is merged.

@fjmolinas
Copy link
Contributor Author

@aabadie rebased

Copy link
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

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

I tested this PR on nucleo-l152re and confirm that low-power can be reached in STOP and STANDBY modes. Values measured in STOP mode are around 60uA, in STANDBY mode the consumption is around 1uA.

Since this PR is also touching the stm32l0, I also tested this PR on nucleo-l073rz. There is a significant improvement in consumption with master thanks to the ultra-low power mode being used.

ACK and go

@aabadie aabadie merged commit 49807f1 into RIOT-OS:master Mar 13, 2019
@vincent-d
Copy link
Member

I had #9521 pending for a long time, which also refactored a bit...will need to rebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: pm Area: (Low) power management CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants