Hello All, I'm finding the same problems that Will X had to put KL03 to VLPS. I can see the power consuption starts around 6mA (RUN Mode), going to around 1mA (VLPR), and going to 210uA when I try to put it on VLPS. I'm thinking that this current is expected on Normal STOP and not on VLPS, that should be around 2uA.
I already read some ANs and many sites for this subject. I found some interesting tips about debugger must be off. Of course that I'm disconnecting it to measure the current, but is it enough? Should I turn it of on any register? I also forced the Flash Config bytes (FSEC) to secure mode, but the power consuption is still the same (210uA). I saw at RM that there is a register called MDM-AP (bit 7) that indicates if Low Power is enabled or not. What can change this MDM-AP bit? Is it configurable?
Is there any other "switch" that I should put on OFF position to reach the 2uA of Power consuption?
I'm using my target board, but only with the MCU and the SWD connector assembled, so only the MCU (KL03) is draining this current.
I'm doing the following sequence:
SMC_PMPROT = 0x22; // enabling AVLP and AVLLS
SMC_PMCTRL = (SMC_PMCTRL_RUNM(2) + SMC_PMCTRL_STOPM(2)); // RUN mode VLPR and STOP VLPS
dummyread = SMC_PMCTRL;
while (!(SMC_PMSTAT & 0x04)); // waiting for VLPR
/* HERE I CAN SEE THE CURRENT GOING DOWN AROUND 1mA */
PortInit() // Config the GPIOs
LPTMR_Init() // Config LPTimer to generate an Interruption each 1 sec.
while(1) {
GoVLPS();
GPIOA_PTOR = 0x20; // toogle the PA5 to check if its comming out from VLPS every sec.
}
void GoVLPS(void){
SCB_SCR |= SCB_SCR_SLEEPDEEP_MASK;
__asm("DSB");
__ams("WFI");
}
Thanks and regards
Ivan
Hi Ivan
To go to VLPS mode you (possibly) shouldn't use the VLPR settings.
See:
http://www.utasker.com/kinetis/FRDM-KL03Z.html
http://www.utasker.com/kinetis/LLWU.html
You can get KL03 OpenSource code from http://www.utasker.com/forum/index.php?topic=1721.msg7086#msg7086 which includes complete low power management.
I just checked on a FRDM-KL03Z
RUN mode = 6mA
WAIT mode = 2.3mA
STOP mode = 136uA
VLPS mode = 2.5uA
VLLS1 mode = 0.7uA
I didn't check VLPR and VLPW since I was using a 48MHz clock, which doesn't allow these without further changes (and so give the same results as RUN and WAIT).
Regards
Mark
Professional support for Kinetis: http://www.utasker.com/index.html
Remote desktop one-on-one coaching: http://www.utasker.com/services.html
Getting started to expert videos: https://www.youtube.com/results?search_query=utasker+shorts