AnsweredAssumed Answered

How to identify, which interrupt changed Power Mode from VLPS to RUN?

Question asked by Akshay Kulkarni on Jan 17, 2019
Latest reply on Jan 22, 2019 by Akshay Kulkarni


In my project, I need to know, which interrupt caused the wake up of MCU from VLPS to RUN. There are few actions I need to perform, based on source of the wake-up. Any input or direction would be a great help. Some of the source for interrupt are,

- GPIO interrupt

- RTC alarm/timer interrupt

- ADC interrupt


One straight forward option I can think of is, manage some flag in all interrupt handlers which will be reset to default value before entering to VLPS. As soon as any interrupt is triggered, MCU moves to RUN mode. For the first ISR call, update the source of that interrupt with the flag. 

Later on, decision will be taken based in that flag. Is there any better/classic way to make it work ? may be some SDK API , MCU registers.


Thanks in advance. 



Akshay K.#