Hi, following the powerdown_demo example to implement both Timer0 source and DIO wake up sources, the device is able to wake up according to timer0 interval setting or manual pressing of button BP1.
However, the POWER_GetResetCause() function only returns 0x40u (PMC_RESETCAUSE_WAKEUPPWDNRESET_MASK), regardless if it is woken up by Timer0 or BP1 button.
Is there another way to check the source of each wake up?
Thanks in advance!
Solved! Go to Solution.
Hello,
Hope you are doing well. The POWER_GetResetCause reads the Reset Cause Register (RESETCAUSE), and the 0x40 (WAKEUPPWDNRESET) specifies that a timer or IO is a possible source:
Regards,
Ricardo
Hi Ricardo, thanks for the pointer. Can I ask which is the document that describes this table?
(Sorry, i'm still new to the SDK)
Thanks.
Hello,
You can find more information about the API's on the "MCUXpresso SDK API Reference Manual_JN5189.pdf".
Also, the information about the register is on the "JN5189(T)/JN5188(T) User manual" (section 1.1.10 Reset Cause Register).
Regards,
Ricardo
Hello,
Hope you are doing well. The POWER_GetResetCause reads the Reset Cause Register (RESETCAUSE), and the 0x40 (WAKEUPPWDNRESET) specifies that a timer or IO is a possible source:
Regards,
Ricardo