cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L451RE - How to detect a wakeup event in shutdown mode?

CGern.1
Associate

STM32L451RE - How to detect a Wakeup event in shutdown mode?

Hi,

I connected a Accelerometer interrupt on Wakeup Pin 2.

In Standby mode "HAL_PWR_EnterSTANDBYMode();" I can wakeup MCU by moving Accelerometer.

After that, the flags "PWR_FLAG_WUF2" and "PWR_FLAG_SB" are set (none of the RCC reset flags are set), which is quiet okay.

If I use Shutdown mode instead "HAL_PWREx_EnterSHUTDOWNMode();" I only can read out a set RCC_FLAG_BORRST flag (BOR), after triggering Wakeup Pin (No PWR flags are set).

Is this due to the fact, that BOR is not available in Shutdown mode?

If yes, how can I distinguish between a BOR and a Wakeup reset?

Thanks,

Chris

0 REPLIES 0