cancel
Showing results for 
Search instead for 
Did you mean: 

Wake from stop mode

Peter Simpson
Associate II
Posted on March 15, 2018 at 08:06

Hi,

     I am using a STM32LO72 device and entering stop mode using

     HAL_PRW_EnterSTOPMode ( PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);

     I have configured the RTC AlarmB to wake the device but it wakes almost inmmediately.

     Would anyone have advice on how to tell which interrupt has caused the exit from STOP mode?

Thank You 

Regards

#stop-mode-wake-source
2 REPLIES 2
Jack Peacock
Associate II
Posted on March 15, 2018 at 08:30

Things I've done to track this down:  First check EXTI to see which interrupts are enabled.  Take a look at RTC->ISR for any other active RTC sources.  Set a breakpoint just before the WFI to see if any EXTIs are pending.

Pending EXTIs are going to clear right after the WFI so you need to catch anything that's active before entering STOP.  The EXTI mask register will tell you the possible sources to narrow it down.

I don;t use the HAL so no idea what it enables.

  Jack Peacock

Posted on March 15, 2018 at 09:17

 ,

 ,

Hi Jack,

Thank you very much for your replay

I have written 0x00000000 to the EXTI_IMR register and that device does not wake

I have written 0x00020000 to the EXTI_IMR register and that device does wake nearly immediately so the interrupt is coming from the RTC on line 17

I have the EXTI line 17 set up as MODE_IT and TRIGGER_RISING

I broke before entering power mode at the RTS->, ISR has the following set

RSF

WUTWF

ALRBWF

ALRAWF

Thank you

Regards

Peter Simpson

<,https://community.st.com/?et=watches.email.thread>, STMicroelectronics Community

Re: Wake from stop mode

reply from Jack Peacock <,https://community.st.com/0D70X000006Sjg7SAC