Showing results for 
Search instead for 
Did you mean: 

Shutdown issue with wakeup reason


Hi all,

I have the following question related with an issue in LOW power modes in STM32 L4.

We have developed a board with a STM32L4+. In this board we set the shutdown mode (by HAL_PWREx_EnterSHUTDOWNMode) and we wake from a wake-up pin (we are using 3 of the wake-up pins). After we wake up we are consulting the SR to watch what was the waken reason. That runs ok with debugger attached. However when we are working without debugger attached this does not work, I mean wake up pins work ok but consulting SR after waking up all of the wake-up bits are 0. In this case, we have detected with an oscilloscope that there is an ¿unexpected? falling edge in the n_rst pin when we wake from wake-up pin (we do not why). Obviously, with the debugger there is no this falling edge in the n_rst pin.

In addition, we have replaced HAL_PWREx_EnterSHUTDOWNMode by HAL_PWR_EnterStandby and it works ok in debugging and normal runtime (There is no falling edge in n_rst).

Does anybody know what might be happening?

Thanks in advance, BR.



We just went through this.

The wakeup pins work with the debugger because when in debugger certain clocks/domains are kept on for debug capability. Once you use without the debugger the clocks/domains are not enabled and the wakeup pins do not work. This is by design and the expected behavior. As pointed out to me the docs state that waking up from shutdown is a POR (Power On Reset). Wakeup pins do not work for POR.

We continue to search for a way to "detect a reason" of why we are waking up.


Hope this helps.