Help with changing power modes

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

Help with changing power modes

572 Views
randenewberry
Contributor IV

I am using an MK02FN64VLH10_64 with KDS 3.0.0, KSDK1.3.0 and Processor Expert on a custom PCBA.

I need to switch between high speed run mode and very low power run mode (VLPR). I have PTC5 as the wake up pin

(active low), and want to invoke VLPR, then use PTC5 to return to the high speed run mode.

I've been working this all day, and just can't resolve the correct steps..

I was able to use the component pwrMan1:fsl_power_manager, and without changing the default, it shows the "High speed run mode". To check what power mode I am running in I used POWER_SYS_GetCurrentMode(); and it returned 1.

Looking at the *.API Reference Manual manual.pfd it seems to indicate "1" is the VLPR, but I think the clock is faster than 4Mhz, and the current consumption indicates HSRUN or RUN mode is being used..

Here is the enum from the manual, page 2133..

 

• enum power_manager_modes_t {

kPowerManagerRun,

kPowerManagerVlpr,       ///////// a 1 would be this mode..Correct??

kPowerManagerWait,

kPowerManagerVlpw,

kPowerManagerStop,

kPowerManagerVlps,

kPowerManagerVlls1,

kPowerManagerVlls3 }

 

The K02P64M100SFA.pdf manual provides data for the IDD_HSRUN mode and IDD_RUN mode and VLRP mode and all the other power modes for the chip. But I do not see the enum for HSRUN in the above?? am I missing something??, 

So now I am somewhat confused, I know the code is executing a lot faster than a 4mhz bus clock, and the current consumption indicates either  HSRUN or RUN mode. I see in the examples that we can not switch between HSRUN and VLPR modes with out manipulating the clock..I tried for a few hours to follow the examples and set the clock but no success..

 

Any Guidance here would be greatly appreciated.

Thank you!

Labels (1)
0 Kudos
1 Reply

287 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Rande,

1. Pay attention , the HSRUN mode can not directly change to VLPR mode ,and requires transition to Run.

you can see the "Power mode state transition diagram" of Reference manual of the chip :

pastedImage_2.png

2. Yes, the chi of MK02FN64VLH10 support the HSRUN mode .

I create one KSDK1.3+PE project about this chip, then click the function of "POWER_SYS_GetCurrentMode()"

, it show :

pastedImage_0.png

the "FSL_FEATURE_SMC_HAS_HIGH_SPEED_RUN_MODE" have been defined in the file of

"MK02F12810_features.h"

pastedImage_1.png

3.  I recommend you refer to the frdm-k22 (the method is the same between the two chip)demo under KSDK1.3 :

KSDK_1.3.0\examples\frdmk22f\demo_apps\power_manager_hal_demo\kds

And please first finish one part , for example finish the from HSRUN to RUN, be sure it well , then

go on the next part .

Hope it helps


Have a great day,
Alice Yang

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

0 Kudos