STM32C031C6: Determine the wakeup source from shutdown mode
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-25 1:34 AM
Hello,
I'm trying to determine the source of the wakeup flag, whether it's the power being turned on or the trigger of wakeup pin 2.
So this is my shutdown function:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-25 4:20 AM
Hello,
Please find attached the example PWR_STANDBY on NUCLEO-C031C6 can help you, this example works on wake-up the system in pressing the User push-button which is connected to the wake-up pin PWR_WAKEUP_PIN2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-25 7:27 AM
Hello @Elhem_ZAY ,
in this example, they check the register for standby mode first, but it's not the same case for shutdown.
For me, the wakeup flag is always zero when I press the button (When the debug is disabled), whereas in debug mode, I receive pwr->SR1 = 258 when I press the button.
