AnsweredAssumed Answered

Problem waking from VLLS

Question asked by Chris Solomon on Nov 27, 2014
Latest reply on Dec 3, 2014 by soledad

Hi,

I am using MQX4.1 on a K70 (part of our product).

We have been working on getting our product updated from MQX4.0.2 on and off for a while now, and I only have a few issues remaining.

One of the things I have been struggling with is getting the unit to wake from VLLS3.

 

Here is the configuration:

At the point we go to sleep we are running from the internal reference oscillator, with OSC0 configured but not used:

MCG_C1       0x44

MCG_C2       0x27

MCG_C3       0x45

MCG_C4       0x14

MCG_C5       0x0

MCG_C6       0x0

MCG_S        0x17

MCG_SC       0x2

MCG_ATCVH    0x0

MCG_ATCVL    0x0

MCG_C7       0x1

MCG_C8       0x0

MCG_C10      0x0

MCG_C11      0x0

MCG_C12      0x0

MCG_S2       0x0

 

OSC0_CR      0xA0

Cannot access memory at address 0x400e5000

OSC1_CR      0x

 

(OSC1 is not accessible because it is not clocked)

 

SIM_SOPT1    0x80089010

SIM_SOPT1CFG 0x0

SIM_SOPT2    0x40471004

SIM_SOPT4    0x0

SIM_SOPT5    0x7F7F7F00

SIM_SOPT6    0x0

SIM_SOPT7    0x0

SIM_SDID     0x31DE

SIM_SCGC1    0x800

SIM_SCGC2    0x0

SIM_SCGC3    0xB425010

SIM_SCGC4    0xF00430B0

SIM_SCGC5    0x47F8F

SIM_SCGC6    0x78440007

SIM_SCGC7    0x7

SIM_CLKDIV1  0x13770000

SIM_CLKDIV2  0x2

SIM_FCFG1    0xD000F00

SIM_FCFG2    0x20A00000

SIM_UIDH     0x320000

SIM_UIDMH    0x29C67801

SIM_UIDML    0x4E452589

SIM_UIDL     0x200F001A

SIM_CLKDIV3  0x0

SIM_CLKDIV4  0x0

SIM_MCR      0x10024

 

before we try to go to sleep we set the deepsleep functionality:

SCB_SCR = SCB_SCR_SLEEPDEEP_MASK | SCB_SCR_SLEEPONEXIT_MASK;

 

and we configure the SMC:

SMC_PMPROT   0x2A

SMC_PMCTRL   0x4

SMC_VLLSCTRL 0x3

SMC_PMSTAT   0x1

 

The LLWU module is configure to wake up on RTC alarm, several port pins, or on reset pin:

LLWU_PE1     0x0

LLWU_PE2     0xFC

LLWU_PE3     0x3F

LLWU_PE4     0x0

LLWU_ME      0x60

LLWU_F1      0x0

LLWU_F2      0x0

LLWU_F3      0x0

LLWU_FILT1   0x0

LLWU_FILT2   0x0

LLWU_RST     0x2

 

The unit seems to 'stop', but doesn't wake up again.

 

This used to work in MQX4.0.2, so I am assuming I have missed some register or peripheral that needs clocking. Any assistance would be greatly appreciated, I have been struggling with this one for a full week now.

 

Thanks

 

Chris

Outcomes