STM32L496 Determine EXTI wake-source when processor has been put in STOP mode
My project uses multiple different GPIO's configured as EXTI interrupt sources, and there is a point where, after calling the API:
HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFE)
Some different instructions should be executed depending on which EXTI rising/falling edge interrupt woke up the processor. The issue is, when debugging, if I check the EXTI's Pending Register(s) none of the possible bits that would encode wake-up sources for the utilitzed EXTI lines are asserted so I cannot tell which interrupt triggered the wake-up. Likewise, I have check the NVIC's ISPR registers to see if any of the EXTI interrupts are set there, and none of the relevant bits are set here either.
Is there any way to know exactly which event woke up the processor from STOP2 mode if all wake-up sources are EXTI interrupts?
