AnsweredAssumed Answered

K40 - waking up from VLLS1 sleep with external oscillator

Question asked by Lovro Oreskovic on Aug 28, 2015
Latest reply on Sep 7, 2015 by jeremyzhou


So I am trying to wake up and start executing from VLLS1 stop with FEE oscillator configuration.

I manage to put it in VLLS1 stop mode with no problems.

If I have FEI configuration enabled everything wakes up fine, but if I have FEE mode enabled it hangs, usually at waiting at checking that the oscillator is running in the __init_hardware function. (i am using Codewarrior 10.6 and MK40DN512ZVLQ10 in LQFP 144-pin package microcontroller ( this is a first version microcontroller so the ACKISO bit is in the LLCU_CS register )


I am trying to clear ACKISO bit on wakeup/powerup, but if i put this code



anywhere before oscillator check I get a Hard Fault.


If I try executing that code in main() it executes just fine. So i can't seem to figure out what to do.


So any help is appreciated :-)


Best Regards, Lovro