Processor Expert and VLLSx

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

Processor Expert and VLLSx

Jump to solution
736 Views
marknordstrand
Contributor III

I'm trying to exit out of VLLS1 on a mk20dn512VLQ10.  Code was generated with CW 10.4.  If the MCG is set up for FEI, the pin for LLWU works as expected.  Switching the MCG to PEE and nothing happens.  From the ref. manual and the Kinetis Low Power Modes manual, I understand the MCG should already be in FEI, so I can see why this is working with little effort.  I did see there is a __init_hardware() in Sources/Cpu.c which looks like it handles the transitions from FEI to PEE.  Tried calling that directly and copying and modifying it to no avail (and setting the ACKISO bit afterwards).  What besides the code in __init_hardware() should be done to get out of VLLS1?

Labels (1)
0 Kudos
1 Solution
619 Views
marknordstrand
Contributor III

So, turns out to fairly simple.  The docs are good, but don't take CW into account.  __init_hardware() is mostly correct, but it needs to have the ACKISO check added.  Turns out this can be done from the CPU Component Inspector:  Build Options --> User Initialization --> User code before PE Initialization.

Now there's the problem of having the same pin put the processor back into VLLS1.

View solution in original post

0 Kudos
1 Reply
620 Views
marknordstrand
Contributor III

So, turns out to fairly simple.  The docs are good, but don't take CW into account.  __init_hardware() is mostly correct, but it needs to have the ACKISO check added.  Turns out this can be done from the CPU Component Inspector:  Build Options --> User Initialization --> User code before PE Initialization.

Now there's the problem of having the same pin put the processor back into VLLS1.

0 Kudos