Hi Daniele Cortellazzi,
If you want to use the LPTMR to wake up your VLLS1 mode, after wake up, the CPU will reset and wake up, you don't need to use the Cpu_SystemReset() function.
You means, the LPTMR can wake up your VLLS1 one time, but the second time, it can't work?
If yes, please clear the LPTMR flag and enable the LPTMR in your LLWU interrupt, just like this :
if (LLWU_F3 & LLWU_F3_MWUF0_MASK) {
// printf("****WUF3_MWUF0 IF LPTMR *****\r\n");
SIM_SCGC5 |= SIM_SCGC5_LPTMR_MASK;
LPTMR0_CSR |= LPTMR_CSR_TCF_MASK; // write 1 to TCF to clear the LPT timer compare flag
LPTMR0_CSR = ( LPTMR_CSR_TEN_MASK | LPTMR_CSR_TIE_MASK | LPTMR_CSR_TCF_MASK );
}
Wish it helps you!
If you still have question, please contact me!
Have a great day,
Jingjing
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------