LLS mode on K20 processor

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

LLS mode on K20 processor

Jump to solution
617 Views
chrispaynter
Contributor I

I am using a MK20DX256VLL7 on a board of our own design, and trying to operate it in LLS mode with MQX.  I have created a custom BSP based on the TWRK20DN72M board support package, and I see that it has LLS mode mapped to LPM_OPERATION_MODE_STOP.   I have copied the relevant code from the low power demo for that tower board, and if functions fine in LLS mode, and I have managed to modify the init_cm.c file to allow wakeup from either the LPO or an external pin transition. 


The problem I have is that the processor still draws about 1.5 mA when in stop mode.  The external oscillator is still running off a 10 MHz crystal, and I do see a small reduction in current if I clear the EREFSTEN bit just before the processor goes to sleep, but then it doesn't wake up again.  I think in a general sense I must have to make some OS calls to set up a different clock setup before going to sleep, but am a bit vague on the mechanics of how that works. I also think that there must be some other sources of power consumption that I need to address, which I'm continuing to experiment with.


Are there any general tips for optimizing low power operation on the Kinetis parts (apart from AN4503 and AN4447), and tracking down where the consumption is coming from?  From reading the specs, I would expect that I should be able to get down in the tens of microamps in LLS mode, and still be able to wake on the LPO or an external input transition.


thanks,

Chris

Tags (3)
0 Kudos
1 Solution
392 Views
chrispaynter
Contributor I

I think I may have answered my own question; the bsp for the twrk20d72n board comes with a couple of clock setups, the default one being 72 MHz.  If I call _lpm_set_clock_configuration(BSP_CLOCK_CONFIGURATION_2MHZ) before going to LPM_OPERATION_MODE_STOP, the external oscillator is disabled, and I'm seeing processor currents of about 3.1 uA.  After waking up, I call _lpm_set_clock_configuration(BSP_CLOCK_CONFIGURATION_72MHZ), and I'm back in business.

The only weird thing now is that the initial processor current of 3.1 uA increases over several minutes to somewhere around 200 uA, but I'm guessing that there are some floating io pins which need to be tied to something or made outputs.

Chris

View solution in original post

0 Kudos
2 Replies
393 Views
chrispaynter
Contributor I

I think I may have answered my own question; the bsp for the twrk20d72n board comes with a couple of clock setups, the default one being 72 MHz.  If I call _lpm_set_clock_configuration(BSP_CLOCK_CONFIGURATION_2MHZ) before going to LPM_OPERATION_MODE_STOP, the external oscillator is disabled, and I'm seeing processor currents of about 3.1 uA.  After waking up, I call _lpm_set_clock_configuration(BSP_CLOCK_CONFIGURATION_72MHZ), and I'm back in business.

The only weird thing now is that the initial processor current of 3.1 uA increases over several minutes to somewhere around 200 uA, but I'm guessing that there are some floating io pins which need to be tied to something or made outputs.

Chris

0 Kudos
392 Views
c0170
Senior Contributor III

Hello Chris Paynter,

I am glad you solved the problem with lowering frequency before sleep :smileywink:

Regarding the current in sleep mode, if you have more questions, you had better ask them in Kinetis section of the community.

Regards,

MartinK

0 Kudos