AnsweredAssumed Answered

Very high current consumption in VLPR mode

Question asked by Maximilian Niedernhuber on Jan 18, 2017
Latest reply on Jan 20, 2017 by Mark Butcher

Hello,

my KL26Z256 doubles the current consumption if I call any function in the main loop.

The MCU is running from internal Clock with 4Mhz/0.8Mhz in VLPR mode.

 

According to the datasheet the worst case current consumption should be around 798uA (Coremark Benchmark in VLPR).

 

Some example code:

uint8_t flg = 0;

void func ( void ){
  volatile int tmp;
  tmp = FGPIOC->PDIR;
}

void main(void)
{      
 
    BOARD_InitPins();
    BOARD_BootClockRUN();


    volatile int tmp;
    while (1)
    {     
      if(flg == 1)
        func();        
      if(flg == 2){     
          tmp = FGPIOC->PDIR;
      }
     if(flg == 3)
        FGPIO_ReadPinInput(FGPIOC,3U);

    }
}

 

If I modifiy the flg variable with the debugger the current consumption is changing according to the following table:

0 -> 0.6mA

1 -> 1,3mA

2 -> 0,6mA

3 -> 1,4mA

 

Is that a normal behavior?

 

 

Best regards

Outcomes