low power mode in the K22FN512VLH12

cancel
Showing results for 
Search instead for 
Did you mean: 

low power mode in the K22FN512VLH12

804 Views
nesrinemhiri
Contributor III

Hello,

I'm starting working with K22FN FREEDOM board and I'm trying to mesuare current consumption in  low power mode using the KSDK demo,

I have a problem i found current consumption higher than the data sheet:

for all LLS,and VLPS i found 200µA!!!

Thank you for the help

Nesrine

4 Replies

163 Views
mjbcswitzerland
Specialist V

Hi Nesrine

You can do a comparison with the FRDM-K22F image at http://www.utasker.com/kinetis/FRDM-K22F.html

In the administration menu the low power modes can be selected for comparison. Pressing SW2 will allow the processor to resume operation from LLS mode.

Unlike the code that you have tested it is not a demo of low power operation but does incorporate low power usage in a complete framework project. It will use WAIT mode by default and dynamically switches between the RUN mode and the chosen low power mode.

However the results are also not as low as the data sheet suggests. The P3V3_K22F current is as follows:

RUN mode = 34mA (expected about 35mA at 120MHz)

WAIT mode = 19mA (expected about 18mA, however the processor is switching between WAIT and RUN and UARTs and USB are fully operational)

STOP mode = 2.6mA (expected about 2.25mA but again this is measured switching between STOP and RUN and the oscillator remains on in STOP state)

LLS mode = 160uA (expected <= 15uA)

VLLS3 = 120uA (expected <= 7.5uA)

There may be explanations for the higher current, such as output pin or other leakage paths, that I haven't investigated.

In comparison however, the same code runs on KL devices and achieves results fairly close to the data sheet values. Generally my experience with K parts has shown low leakage values about an order of magnitue greater that the data sheet values - but this is using the standard boards (just using the current measurement jumper) and hasn't excluded leakage that may be involved in the board design (and/or debugger paths).

Regards

Mark

Kinetis: µTasker Kinetis support

K22: µTasker Kinetis FRDM-K22F support / µTasker Kinetis TWR-K22F120M support

For the complete "out-of-the-box" Kinetis experience and faster time to market

0 Kudos

163 Views
nesrinemhiri
Contributor III

Hi

I use the same board as the FRDM-K22F image at http://www.utasker.com/kinetis/FRDM-K22F.html

so what is the solution to have the same result as the datasheet!!!

0 Kudos

163 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi nesrine mhiri,

    Did you comment all other Port initial code, and just leave the low power enter in code?

    I do it like this, and my low power data on my FRDM-K22F is nearlly the same as the datasheet.

    VLPS: 9.4 uA (datasheet 8.7 to 27.5uA )

    LLS:  5.2uA (datasheet 3.8 to 7.5uA)

My low power enter code(MDK) is as follows

void enter_LLS(void)

{

  SMC_PMPROT = SMC_PMPROT_ALLS_MASK;

  /* Set the STOPM field to 0b011 for LLS mode  */

  SMC_PMCTRL &= ~SMC_PMCTRL_STOPM_MASK;

    SMC_PMCTRL &= ~SMC_PMCTRL_RUNM(0X3);

  SMC_PMCTRL |=  SMC_PMCTRL_STOPM(0x3);

  /*wait for write to complete to SMC before stopping core */

  /* Now execute the stop instruction to go into VLLS */

  //stop();

    SCB->SCR |= 0x4u;  

    /* WFI instruction will start entry into STOP mode */

    //asm("WFI");

    __wfi();

  

}

void enter_VLPS(void)

{

  SMC_PMPROT = SMC_PMPROT_AVLP_MASK;

  /* Set the STOPM field to 0b011 for LLS mode  */

  SMC_PMCTRL &= ~SMC_PMCTRL_STOPM_MASK;

    SMC_PMCTRL &= ~SMC_PMCTRL_RUNM(0X3);

  SMC_PMCTRL |=  SMC_PMCTRL_STOPM(0x2);

  /*wait for write to complete to SMC before stopping core */

  /* Now execute the stop instruction to go into VLLS */

  //stop();

    SCB->SCR |= 0x4u;  

    /* WFI instruction will start entry into STOP mode */

    //asm("WFI");

    __wfi();

  

}

:

You can use my code , and comment all other code, then try again.

Wish it helps you!

If you still have question, please contact me!


Have a great day,

Jingjing

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

163 Views
mjbcswitzerland
Specialist V

Hi All

I pointed out in a previous post that the binary at µTasker Kinetis FRDM-K22F support consumes about 120uA in LLS, which is a magnitude higher than that what is actually expected in the very worst case.

Therefore I decided to take a closer look to find out why.

The binary that I used as reference has USB-CDC operating before moving to the LLS mode and this is a composite USB device with 3 UART bridges.

I tried changing some project settings and found that as soon as I reduced the number of USB-CDC devices to a single one the current went down to 4uA.

Since the USB is the same irrespetive of the number of CDC interfaces I then checked the UARTs being used but didn't find any loading paths on the board when they are enabled and connected to their ports.

By removing the UART MUX function at the pins the current also reduced to 4uA in LLS even with three UARTs configured.

What I then found was that by touching the UART lines with my fingers I could influence the LLS current. So obviously leaving them floating was not good.

I subsequently configured pull up resistors on the UART Tx and Rx lines and then the original software configuration could be set to LLS with 4uA current consumption. Note that both Rx and Tx are important.

This means that to ensure that the values are not higher than expected there is a fairly simple rule:

- don't let any pins configured as peripherals float when in a low leakage mode since this obviously causes quite high leakage currents to result

- if the HW doesn't define the state, enable pull-ups or pull-downs to suit to keep them stable.

Then the results are as expected!

I have attached a binary for anyone interested in verifying it. The USB device can be connected and it will appear as 3 x virtual COM ports, whereby the processor current is about 20mA (it is dynamically using WAIT mode whenever it can, otherwise the RUN mode current is about 35mA).

On the OpenSDA virtual COM at 115200 Baud move to the Administrator menu and command the LLS mode with "set_lp 5" and the USB will disconnect and the processor current drops to < 4uA.
Press the button SW2 and the processor wakes back to full operation and the USB connect again. Repeat as rquired.

Regards

Mark

Kinetis: µTasker Kinetis support

K22: µTasker Kinetis FRDM-K22F support / µTasker Kinetis TWR-K22F120M support

For the complete "out-of-the-box" Kinetis experience and faster time to market

0 Kudos