Skip to main content
james4452
Associate
Sep 27, 2026 9:27 AM UTC
Question

Best practice for waking STM32 from STOP mode via multiple GPIO interrupts?

I'm working on a battery-powered sensor node using an STM32L4 series MCU. I need to wake from STOP2 mode on either of two GPIO interrupts (button press or external sensor trigger) and want to identify which one triggered the wake before running my main loop.

What's the recommended way to configure and distinguish the wake source cleanly — checking EXTI pending register flags right after wake, or is there a better pattern people use for this?

1 reply

AScha.3
Super User
Sep 28, 2026 8:42 AM UTC

Imho , checking EXTI pending register flags right after wake is the best , easy, and most clear way to identify which one triggered the wake .

 

If you feel a post has answered your question, please click on " Best Answer ".