DEEP SLEEP

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

DEEP SLEEP

8,028件の閲覧回数
haroldvogel
Contributor II

Here is the code that I am using to put my MK36L256VLL4 chip into Deep Sleep but the system is drawing 175m volts.  Hope some one can tell me where I am going wrong:

Original Attachment has been moved to: deepSleep.c.zip

0 件の賞賛
返信
31 返答(返信)

621件の閲覧回数
haroldvogel
Contributor II

Hello Ping,

I don't see a low power demo.  I don't see in the code where it is calling wfi in the code.

John V.

0 件の賞賛
返信

621件の閲覧回数
haroldvogel
Contributor II

Hello Ping,

Do pins not being used have pull up resisters on them?

If they don't are they in a tri-state or are they off?

John V.

0 件の賞賛
返信

621件の閲覧回数
haroldvogel
Contributor II

Hello Ping,

What is the difference between MUX_MASK, MUX_GPIO, MUX_ALT2, and MUX_ALT3 and how do I know which to use when I am turning OFF/ON a line in the code example:

PORTE_PCR5 &= ~(uint32_t)(PORT_PCR_MUX(MUX_MASK);

PORTE_PCR24 &= ~(uint32_t)(PORT_PCR_MUX)(MUX_MASK);

PORTE_PCR5 != (unit32_t)(PORT_PCR_MUX(MUX_GPIO);

PORTE_PCR24 |= (unit32_t)PORT_PCR_MUX(MUX_MASK);

as you see the PCR5 turns off with MUX_MASK but on with MUX_GPIO and PORTE_PCR24 use MUX_MASK for both, was wondering why and how do I know which to use, not sure if this could be causing the problem.

John V.

0 件の賞賛
返信

621件の閲覧回数
haroldvogel
Contributor II

Hello Ping,

Well was able to test the code with the re-marks that you made but still the same result.

The only thing that I can think of is a pin is either tri-stated or is configured incorrectly, not sure how to check this.  The reason I say this is that if an older version of the code is loaded on the system then the unit goes into Deep Sleep mode (the Deep Sleep mode is the same as the code that I posted on this request) the only change is that the old chip was 125 instead of the 256 chip and the lines that have been configured for use now.

0 件の賞賛
返信

621件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi John,
Please try the codes below, I think it can make the MCU enter the LLS mode successful.

void enter_lls(void)

{

  volatile unsigned int dummyread;

  /* Write to PMPROT to allow LLS power modes this write-once

     bit allows the MCU to enter the LLS low power mode*/

  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_STOPM(0x3);

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

  dummyread = SMC_PMCTRL;

  dummyread++;

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

  #ifdef CMSIS

  /* Set the SLEEPDEEP bit to enable deep sleep mode (STOP) */

  SCB_SCR |= SCB_SCR_SLEEPDEEP_MASK;

  __wfi();

#else

  stop();

#endif

}


Have a great day,
Ping

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

0 件の賞賛
返信

621件の閲覧回数
haroldvogel
Contributor II

Hello Ping,

Thanks I will try the code out and see how it goes. I was wondering what the ‘stop()’ function does?

Sincerely,

John Vogel

0 件の賞賛
返信

621件の閲覧回数
haroldvogel
Contributor II

Hello Ping,

Thanks for confirming that the unit is using more power than it should.  Do you have any idea why the MCU is using so much power?  The attached file, with the first posted message, shows what is done to put the unit into Deep Sleep, is there something that is missing?

Sincerely,

H. John Vogel

0 件の賞賛
返信

621件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi Harold,

I was wondering if you can tell me what the exactly power consumption after the K36 enter the LLS mode.

I'm looking forward to your reply.
Have a great day,
Ping

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

0 件の賞賛
返信

621件の閲覧回数
haroldvogel
Contributor II

Found out that the 175 millivolts is 450 micro amps.  Hope this helps.

0 件の賞賛
返信

621件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi Hardold,

We usually check out the power consumption level to find out the MCU enter what the kind of the low power mode, none with the voltage supply level.

About your case, the power consumption seems too large for the LLS mode and I've attached the Fig 1 which come form the datasheet.

2016-05-06_9-30-13.jpg


Have a great day,
Ping

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

0 件の賞賛
返信

621件の閲覧回数
haroldvogel
Contributor II

Hello Ping,

Sorry I thought I had entered that in my request. The power consumption is 175m volts if you wish to know the amps I will have to get with the EE to find out.

I hope that this helps.

John V.

0 件の賞賛
返信