Hi, I am working with kinetis W 21D256 micro-controller. My application is battery powered so that I want to optimize power as much as possible... All I need to do is switch between Run Mode and Vlpr mode via RUN.I'm changing the mcg mode to BLPI and turn

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Hi, I am working with kinetis W 21D256 micro-controller. My application is battery powered so that I want to optimize power as much as possible... All I need to do is switch between Run Mode and Vlpr mode via RUN.I'm changing the mcg mode to BLPI and turn

793 Views
madanm
Contributor II

Hi, I am working with kinetis W 21D256 micro-controller. My application is battery powered so that I want to optimize power as much as possible... All I need to do is switch between Run Mode and Vlpr mode via RUN.I'm changing the mcg mode to BLPI and turning OFF the clock monitor,SMC_PMPROT[AVLP]) is set,SIM_CLKDIV1_OUTDIV1=0,SIM_CLKDIV1_OUTDIV2=1,SIM_CLKDIV1_OUTDIV4=4. But PMC  REGONS bit is not turning 0. Is there anything else that I need to do. Please give me any suggestions.   Best Regards, Madan

0 Kudos
Reply
5 Replies

643 Views
isaacavila
NXP Employee
NXP Employee

Hello Madan,

You need to accomplish a specific routine in order to change to VLPS mode (low power mode) from RUN mode. There is an example (lwirelessUART from SMAC folder) included in Beekit Wireless Connectivity Toolkit (BeeKit Wireless Connectivity Toolkit|Freescale) that shows you how to switch to VLPS in run time. (Function called WUApp_PrepareToEnterLowPower accomplishes this routine, it is located at main.c file) Hope this can help you as guidance.

Best Regards,

Isaac Avila

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

643 Views
madanm
Contributor II

Hi isaacavila,

Thanks for your reply, VLPS mode is running fine but i want to run the controller from RUN mode to VLPR mode.

Best Regards,

Madan M

0 Kudos
Reply

643 Views
isaacavila
NXP Employee
NXP Employee

Hi Madan,

Have you changed to VLPR mode successfully?

Regards,

Isaac

0 Kudos
Reply

643 Views
madanm
Contributor II

Hi isaacavila,

                    Thanks for your suggestion, It worked fine I have archived  2MHz clock in VLPR & current consumption also reduced to 2mA for my application.

Regards

Madan M

643 Views
isaacavila
NXP Employee
NXP Employee

Hi Madan M,

Sorry for giving you reference about VLPS instead of VLPR mode.

You can check this application note about Power Magaement for Kinetis (http://cache.freescale.com/files/32bit/doc/app_note/AN4503.pdf)

In this AN, you can notice in section 2.5.3 (in document it is written as 2.5.2 but it was a typo error) the sequence to enter in VLPR:

  • Be in BLPI (using fast IRC for the MCG or LIRC is using MCG_Lite) or BLPE clock mode.
  • Set the core freqnecy to 4 MHz or less and flash clock to 1 MHz or less (800kHz - 1MHz).
  • Not have the slow IRC enabled.
  • Disable the clock monitor.
  • Disable FIRC on devices using the MCG_Lite.
  • Write the SMC_PMCTRL RUNM bits to enter VLPR.

Remember to set PMPROT[AVLP] = 1 to allow MCU to enter to VLPR mode.

You can check this AN for more information.

If you problem persists please let me know it.

Best Regards,

Isaac

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply