Hi All
I'm trying to implement the LLS mode on my MK22FX512VLH with two wakeup sources: CMP0 and CMP1. Unfortunately, only CMP0 wakes up the MCU, CMP1 has no effect. Does anyone know why?
If I enable only CMP0 or CMP1, it works.
Regards,
Mathias
Hi, Mathias,
Any wake up source of LLWU with interrupt happens, it will wake up the core from LLS mode. The related CMP interrupt flag and LLWU interrupt flag will set accordingly.
The LLWU interrupt must not be masked by the interrupt controller to avoid a scenario where the system does not fully exit stop mode on an LLS recovery.
Wish it helps.
best regards
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Hui,
As I answered you by mail, all flags (CMP0 and CMP1 flag in LLWU_F3, CMP0 & CMP1 & LLWU flag in NVIC) are cleared in LLWU interrupt routine.
What does "LLWU interrupt must not be masked by the interrupt controller" exactly mean? How do I have to route the LLWU interrupt, if it must not be masked by NVIC?
Best regards,
Mathias
Hi Mathias,
I do a test with TWR-K21F120M boar (similar with K22 120MHz product) and both CMP0 and CMP1 could wake up core from LLS low power mode.
Please check attached code for more detailed info.
Wish it helps.
best regards
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------