soc: stm32l0: Clear LPSDSR when exiting STOP mode
Clear the LPSDSR bit of PWR_CR to restore the voltage regulator mode when exiting from STOP mode. Leaving LPSDSR set can cause cause stability issues because the MCU will enter low-power sleep mode instead of normal sleep mode when the core idles and this is not what the rest of the implementation expects. Signed-off-by: Alexander Mihajlovic <a@abxy.se>
This commit is contained in:
parent
7dc9143227
commit
dafc4383fd
1 changed files with 1 additions and 0 deletions
|
@ -58,6 +58,7 @@ __weak void pm_power_state_exit_post_ops(struct pm_state_info info)
|
|||
case PM_STATE_SUSPEND_TO_IDLE:
|
||||
LL_LPM_DisableSleepOnExit();
|
||||
LL_LPM_EnableSleep();
|
||||
LL_PWR_SetRegulModeLP(LL_PWR_REGU_LPMODES_MAIN);
|
||||
|
||||
/* Restore the clock setup. */
|
||||
stm32_clock_control_init(NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue