2019-08-29 10:17 AM
I have the system clock set as 120Mhz. I used the HAL driver code, HAL_PWR_EnterSLEEPMode, to enter Low power sleep mode. However, when it checks if it's in run mode, it doesn't recognise its actually in run mode.
/* If in run mode, first move to low-power run mode.
The system clock frequency must be below 2 MHz at this point. */
if (HAL_IS_BIT_SET(PWR->SR2, PWR_SR2_REGLPF) == RESET)
{
HAL_PWREx_EnableLowPowerRunMode(); // this never execute.
}
When it wakes up, the clock speed is still in 120Mhz?
Can anyone help explain me this behaviour? I am using STM32L4R5QII6P processor.