Skip to content

Conversation

wdx04
Copy link

@wdx04 wdx04 commented Aug 25, 2025

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

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[X] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

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.


@multiplemonomials
Copy link
Collaborator

multiplemonomials commented Aug 25, 2025

Once again, amazing find on this! We really appreciate your contributions here!

We'd love for you to join our maintainer discord server so that we can talk about Mbed development more easily! Here's an invite link [REDACTED]

@multiplemonomials multiplemonomials merged commit 75ae1e0 into mbed-ce:master Aug 26, 2025
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants