Fix the slow wake-up of STM32U5 from deep sleep #489
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
On STM32 microcontrollers, the ForceOscOutofDeepSleep function is called after wake-up from deep sleep, to setup an initial system clock. Inside this function, RCC_MSIRANGE_11 is used to specify the MSI clock frequency for STM32L4, STM32L5 and STM32U5 series. Unfortunately, RCC_MSIRANGE_11 has different a meaning in STM32U5 than in STM32L4 and STM32L5. In STM32L4 and STM32L5, RCC_MSIRANGE_11 stands for 48MHz which is the highest MSI frequency. But in STM32U5, RCC_MSIRANGE_11 means just 768KHz. To use the highest MSI clock frequency (48MHz) on STM32U5, we need to change the MSI clock range to RCC_MSIRANGE_0.
Impact of changes
Migration actions required
Documentation
None.
Pull request type
Test results
Greentea test log:
log.txt
There is one failed test:
25 - test-mbed-hal-common-tickers
Note this test has been modified recently, the earlier version (before commit #469) of the test is passable.