Skip to main content
Professional
Associate III
December 11, 2018
Question

STM32L475 Exits from HAL_PWREx_EnterSTOPxMode immediatly

  • December 11, 2018
  • 1 reply
  • 407 views

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

This topic has been closed for replies.

1 reply

Mohamed Aymen HZAMI
ST Employee
December 17, 2018

Hello,

Do you have another wake up source enabled ?

Regards,

Mohamed Aymen.