Hi All,
This is regarding wakeup functionality of MCF51QU64. In our application, we are using LPTMR 0 to wakeup from VLLS3 mode.
OSC clock used for LPTMR and ERCLKEN, EREFSETN bit settings made to work during STOP mode.
To enter into VLLS3 following settings made:
PMPROT[AVLLS]=1, PMCTRL[STOPM]=100,
VLLSCTRL[VLLSM]=x (VLLSx), STOPE=1, WAITE=0
STOP instruction issued
To wakeup, following setting is being used:
/* Enable LPtmr0 as wake up source for Very Low Leakage Wake Up */
LLWU_ME |= 0x01;
The processor is not waking up from this mode. But LPTMR is working as expected and code written in such a way that if it comes out of VLLs3 mode,clock settings are reinitialized.
Are there any setting missing with respect to wakeup?
If we configure it to wake up from LLS mode, then the processor is waking up(not with VLLs3).
Regards
Vani
Check "7.3 Module Operation in Low Power Modes" carefully. Are you using OSCx (high) or OSCx 32kHz? Only the latter works in VLLS3 as far as I can tell.
LPTMR1 has more clocking options than LPTMR0 (OSC2ERCLK, may not matter in your case).
Can you change the timer to use the LPO and see if that works? That should isolate the problem to Timer-Wakup or to the Oscillator.
Tom
To go from Powered state of MCU to VLLS3 mode, is there any delay required, though we didn’t see such delay mentioned in data sheet.
On providing some delay before issuing the stop instruction, is making the micro come out of VLLS3(though it may sound weird).
Thanks & Regards,
After some clocking changes you may have to poll "22.3.7 MCG Status Register (MCG_S)" to make sure the changes are complete before proceeding. Also check "22.4.1.2 MCG mode switching" and following.
Tom
We are using OSCx 32kHz for LPTMR0.
We tried with both LPO and OSC32 as clock sources. But the behavior is same, not coming out of sleep.
Thanks & Regards,