MKL17Z256VFM4 Waking up from VLLS1 with LPTMER

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

MKL17Z256VFM4 Waking up from VLLS1 with LPTMER

Jump to solution
469 Views
laurenthenault
Contributor III

Hello,

I'm having trouble waking up from VLLS1 using LPTMER. I already tested the same settings and config with LLS and get the result I'm looking for  :  

Debugger disconnects, sign it went into LLS ---> 8 seconds later, led lights up when execution picks up right after __WFI(); call .

Using the same set up but putting the MCU in VLLS1, the debugger disconnects, sign it went into VLLS1 but does not reset after the expected 8 seconds.

Here's the main bit of code I do outside of initialization of SMC and LLWU from processor expert.

pastedImage_1.png

Here is the LLWU config code, enabling the LPTMR module as an interrupt source.

pastedImage_5.png

Here is the SMC config code, set up to allow the switch to VLLS1

pastedImage_6.png

The MCU does not appear to be resetting so I doubt it reaches the LLWU handler but here is the LLWU_irqHandler part anyway.

pastedImage_7.png

Hopefully that's enough information to maybe see what I could be missing that stops the MCU from either reacting to the LPTMR interrupt or from resetting once it has received the interrupt.

Thanks for the help!

Labels (1)
0 Kudos
1 Solution
372 Views
laurenthenault
Contributor III

Fix ended up being to write a 1 to PMC_REGSC[ACKISO] to unlatch the peripherals and I/O pads so my code would run normally after the reset. 

I disregarded this as I thought the initialization would set the peripherals in the right state after the reset, but they still are latched if you don't write a 1 to PMC_REGSC[ACKISO] after the reset.

View solution in original post

1 Reply
373 Views
laurenthenault
Contributor III

Fix ended up being to write a 1 to PMC_REGSC[ACKISO] to unlatch the peripherals and I/O pads so my code would run normally after the reset. 

I disregarded this as I thought the initialization would set the peripherals in the right state after the reset, but they still are latched if you don't write a 1 to PMC_REGSC[ACKISO] after the reset.