I am facing a small issue while waking up from suspend mode in MIMXRT1064.
We are implementing sleep mode in our firmware for the chip and we have managed to successfully get it to transition into suspend mode and wake up on GPIO and RTC interrupt. Our application has 4 GPIO pins (external digital inputs) and RTC as the wakeup sources.
The issue is that we need to know the exact source of the wakeup i.e. which of the four GPIO pins or the RTC was responsible for the wakeup. Since the wakeup from suspend mode is a reset, I am not sure how we would get that info.
After the wakeup reset, I tried reading the GPIO interrupt status register and GPIO data register but they have their reset values. Moreover the SRC (System Reset Controller) does not give any specific information regarding the exact wakeup source.
Could someone please help me out in this pease? It is critical to know the wakeup source as our application has to send this information to the server on every wakeup.