2020-09-22 02:49 PM
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