-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Allow to use all STM32 targets prescaler for LPTIM #15051
Conversation
@hallard, thank you for your changes. |
@hallard please note that such change will reduce the LP timer resolution and will have impacts on mbed-os timer precision and therefore on scheduling. The precision will be 128 timers lower with pre-scaler set to 128 vs. 1. mbed-os mandates that frequency is between 8KHz and 64KHz. |
Agree with Laurent, we can approve if there is some "comments" that choosing value greater than 4 can work, but out of mbed-os requirements. |
Sure, of course, do you want me to update the documentation also or leaving |
This pull request has automatically been marked as stale because it has had no recent activity. @0xc0170, @MarceloSalazar, @ARMmbed/mbed-os-maintainers, please complete review of the changes to move the PR forward. Thank you for your contributions. |
CI started |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
Summary of changes
Allows using all prescalers available for STM32 LPTIM , allowing to have less consumption on long sleep such as LoRaWAN app
Impact of changes
Power consumption optimization
Migration actions required
Documentation
Power consumption graph below, measured just after LoRaWAN join at the begining
![image](https://user-images.githubusercontent.com/2471931/132063556-e546ed13-be26-4e26-b213-9344e1141787.png)
Setting to today maximum value to
4
show power peaks in red and average consumption (3m46s runtime) to 5.57uAThis PR allows prescaler up to 128 resulting power peaks in green and average consumption (3m46s runtime) to 4.16uA
Leaving default values to
1
provide following graph, power peaks in yellow and average consumption (3m46s runtime) to 9.85uAWhat's interesting is that longer is sleeping higher is consumption on wake up, my assumption is that mbed-os has more things to do so takes more time when waked less often, makes sense, confirmed by zooming peaks
Pull request type
Test results
Reviewers
@0xc0170 , @jeromecoutant , @MarceloSalazar