MKV31 & FreeRTOS - VLPS Mode

Showing results for 
Search instead for 
Did you mean: 

MKV31 & FreeRTOS - VLPS Mode

Contributor I

Hi All,


I’m working with a Kinetis MKV31F512VLH12 and am trying to put it into VLPS low power mode. I’m using the MCUXpresso IDE and using the FreeRTOS OS. I’ve used the ConfigTools within Xpresso to do my pin configurations and generate most of my drivers.

I have a task running that blinks an LED, so I know if the processor is in run or stop mode.

My code that I’m using to put the processor into VLPS mode is below:

void Sleep(void)






  __asm volatile ("dsb");

  __asm volatile ("WFI");



I noticed that the datasheet says that “With debug enabled, transitions from Run directly to VLPS are not allowed and result in the system entering Stop mode instead.” As a result, I am programming a Release configuration, disconnecting the debugger, and then resetting the micro.


Upon reset, I observe the processor drawing about 40mA, which seems to be the HSrun mode current. I am able to see the current draw drop down to ~8mA, but then immediately jumps back up to ~40mA. The LED only stops blinking briefly during the period when the current drops to 8mA.


I’m assuming that the period of 8mA current draw is the processor entering VLPS, though that still seems like a lot of current for VLPS. I’m also thinking that something keeps waking the processor, but I can’t figure out what that might be. My “DisableGlobalIRQ” call is an attempt to disable all interrupts, but perhaps this isn’t doing what I think it is doing.


Any help is appreciated! Thanks!

Tags (1)
0 Kudos
1 Reply

NXP TechSupport
NXP TechSupport

Hi Kyle,

In the SDK there's an example called power_manager that can enable each of the low power modes, if you enable the VLPS are the same measurement (8mA)?

Best Regards,

Alexis Andalon

0 Kudos