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 ?
解決済! 解決策の投稿を見る。
Hi Nesrine,
I've compared the reference manual between the MK10FX512VLQ12 and MK70FN1M0VMJ12 careful and I didn't found any differences about enter lowpower mode sequencing between the K10 and K70.
So I'd like to confirm that some thing.
1. Where does the code stick at after execute the enter_vlls1() function when you debug this project.
2. Does the MK10FX512VLQ12 can't enter all low power modes or just the VLLS1 mode?
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi
I try the demo of TSI_demo_lowpower ,it run okey with TWR-K70F120M and it works fine;but when i try it with MK10FX512VLQ12 i ddinot have the same result and my device can not enter in low power mode.
so i can say that there a diffirence between MK10FX512VLQ12 and TWR-K70F120M ,and the problem may be related to the hard (wakeup active that blocked the device to enter in low power mode)
my question that is there diffirence in hard or is there a pin of wakeup that I have to activate in order to enter in low power mode.
Note:I take the chip MK10FX512VLQ12 and i do a generic boad with the minimal hardware and it work well with other code like CoreMark but i have problem with low power mode.
Hi Nesrine,
I've compared the reference manual between the MK10FX512VLQ12 and MK70FN1M0VMJ12 careful and I didn't found any differences about enter lowpower mode sequencing between the K10 and K70.
So I'd like to confirm that some thing.
1. Where does the code stick at after execute the enter_vlls1() function when you debug this project.
2. Does the MK10FX512VLQ12 can't enter all low power modes or just the VLLS1 mode?
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi
I have one pin floationg this is the problem
Thank you ping
Have a nice day
Hi Nesrine,
I've attached a TSI_demo_lowpower demo and please refer to it for devtails.
I've also run this demo with TWR-K70F120M and it works fine (Fig1 ).
The demo is compatible with 120Mhz MCU, so it could run with MK10FX512VLQ12 too.
Fig1 Wake up from VLLS1 mode to RUN mode
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Ping
Thank you for your reply,
Have a nice day
Nesrine
other remarque my device can not enter to any low power mode,when i debug it execute the the WFI without crashing.
there is an errata?