Skip to main content
CGern.1
Visitor II
September 22, 2020
Question

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

  • September 22, 2020
  • 0 replies
  • 509 views

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

This topic has been closed for replies.