Allow to use all STM32 targets prescaler for LPTIM #15051
Merged
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.
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