Determining Wakeup Source for Suspend mode in MIMXRT1064 MCU

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Determining Wakeup Source for Suspend mode in MIMXRT1064 MCU

796 Views
mayureshmanjrek
Contributor II

Hi,

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.

Best Regards,

MManjrekar

0 Kudos
Reply
1 Reply

716 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hello MManjrekar, 

Unfortunately, there isn't a register that tells you the wakeup source. We only have a register that tells you the reset type that occurred. The example power mode switch provided in the SDK uses this register to determine the reset type.

 

As a workaround, you could try the following. Once the MCU is awake, you will need to initialize your 4 GPIO pins and read the state of all of them to determine which one was the wakeup source, if none of them is activated, it will mean that it was the RTC. The implication of this approach is that you will need to keep the GPIO activated until you determine the wakeup source, for example, if you are planning to use a switch on each GPIO, the user will need to keep pressing the switch until the MCU determines which GPIO was the wakeup source.

Have a great day,

Victor

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply