AnsweredAssumed Answered

MK10 low power mode

Question asked by nesrine mhiri on Oct 7, 2014
Latest reply on Oct 13, 2014 by nesrine mhiri

I am using K10 Microcontroller - MK10FX512VLQ12. I want to measure current consumption in low power mode,for exampe this is my code to mesaure consumption in VLLS1 :

 

#include "common.h"

#include "lptmr.h"

#include "smc.h"

#include "llwu.h"

#include "mcg.h"

#include "pmc.h"

/********************************************************************/

int PEE_to_BLPE(void);

int BLPE_to_PEE(void);

void clockMonitor(unsigned char state);

 

 

extern int mcg_clk_hz;

extern int mcg_clk_khz;

extern int core_clk_khz;

 

 

#define UNDEF_VALUE  0xFF

 

 

void main (void)

{

  #ifdef KEIL

  start();

  #endif

/*Disable Clock Out*/

                 for(int i=0;i<32;i++)

    {

    PORT_PCR_REG(PORTB_BASE_PTR,i)= (

PORT_PCR_MUX(0));

     PORT_PCR_REG(PORTC_BASE_PTR,i)= (

PORT_PCR_MUX(0));

     PORT_PCR_REG(PORTD_BASE_PTR,i)= (

PORT_PCR_MUX(0));

     PORT_PCR_REG(PORTE_BASE_PTR,i)= (

PORT_PCR_MUX(0));

    }

/*Enable all operation modes because this is a write once

register*/

     SMC_PMPROT =     SMC_PMPROT_AVLLS_MASK |

                      SMC_PMPROT_ALLS_MASK  |

                      SMC_PMPROT_AVLP_MASK;

/*low power mode*/

            enter_vlls1();

}

 

/********************************************************************/

 

with this code i found IDD_VLLS1=23.225mA or in datasheet IDD_VLLS1=208µA can you help me ?

Outcomes