-
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
STM32WL System Clock differs at boot/reset and after deepsleep #15470
Comments
cc @ARMmbed/team-st-mcd |
In the meanwhile, I found the reason On init, clock is setup to 4MHz see STM32Cube_FW/system_stm32wlxx.c and After deepsleep, RCC_OscInitStruct.MSIClockRange = RCC_MSIRANGE_11; So I don't think it's a bug or whatsoever, but worth mentioning because running at 4MHz can have some side effect see #15463 I tried to slow down frequency (8Mhz, 16MHz, 24MHz, ...) to lower consumption in So quick and dirty fix is going to deepsleep at startup. int main()
{
// Go go speed cruise, Don't go below 8ms
// because it could stay at 4MHz (time to setup ?)
ThisThread::sleep_for(10ms);
....
} |
Description of defect
When the board is booting up of after a reset button push, sysclock is set to 4Mhz and immediately atfer first deepsleep Sysclock is back to 48MHz, I don't know if it is intentional, issue or just normal behavior.
Anyway it could be cause of my previous issue a boot #15463
Target(s) affected by this defect ?
STM32WL, may be others
Toolchain(s) (name and version) displaying this defect ?
What version of Mbed-os are you using (tag or sha) ?
mbed-os-99.99.99
What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
MBED Studio V1.4.5
How is this defect reproduced ?
build an run following code
result is as follow
Starting with a small deepsleep fix the issue
result is as follow
Please not that sleeping less than 8ms when starting does not resolve the issue, looks like some time is needed for clock going to 48MHz
The text was updated successfully, but these errors were encountered: