cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L475 Exits from HAL_PWREx_EnterSTOPxMode immediatly

Professional
Senior

Hello

i want to exit from STOP mode using RTC has in the example of STM32Cube\Repository\STM32Cube_FW_L4_V1.12.0\Projects\NUCLEO-L476RG\Examples\PWR

But the STM32 exits immediatly after the WFI execution.

It works well with the HAL_PWR_EnterSTANDBYMode function (a reset from RTC occurs 10s after WFI execution)

here's the code :

      HAL_RTCEx_DeactivateWakeUpTimer(&hrtc);

//0.5ms*20000=10s

      HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 20000, RTC_WAKEUPCLOCK_RTCCLK_DIV16);

      HAL_SuspendTick();

      HAL_PWREx_EnterSTOP1Mode(PWR_STOPENTRY_WFI);

      SYSCLKConfig_STOP(); //re-start the ticks !!!

      HAL_ResumeTick();

Have you any idea ?

thanks

Regards

1 REPLY 1
Mohamed Aymen HZAMI
ST Employee

Hello,

Do you have another wake up source enabled ?

Regards,

Mohamed Aymen.