cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L0 Wakeup Source Detection

nikhivv07
Associate II

HI,

MCU :STM32L010R8Tx

Power Mode : Shutdown Mode

Wake Up Sources : RTC WakeUp, External WakeUp Pin 1 , External WakeUp Pin 2.

 

Reading Boot reason by checking one by one using __HAL_RCC_GET_FLAG(Flag).

And Able to detect Standby Wakeup.

 

But How to know the source of wake Up whether it is caused by wakeup Pin or RTC ?

 

_Nikhil v v 

2 REPLIES 2
Imen.D
ST Employee

Hello @nikhivv07,

Please have a look at this post that may help you:

[STM32L0] Wake up Flag for RTC does not rise when ... - STMicroelectronics Community

 

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
nikhivv07
Associate II

Hi,

thank you for the reference.

When device going to low power mode we are configuring RTC Wakeup time by writting

hrtc->Instance->WUTR = (uint32_t)WakeUpCounter; 

where wakeupcounter is the count value in seconds.

i like to know to which count register value is comparing to wakeupCounter (WUTR) to wakeup from Low Power Mode.

 

thanks,

Nikhil v v