KL82Z - STOP mode vs tickless idle

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

KL82Z - STOP mode vs tickless idle

Jump to solution
2,821 Views
nickbedbury
Contributor III

Setup

I'm trying to get a KL82Z to operate in RUN mode when necessary (when tasks need to execute), otherwise STOP mode to save power. 

  • My project employs freeRTOS and Processor Expert (PE) via Kinetis Design Studio IDE
  • I'm using KSDK 1.3.0
  • I enabled tickless idle as well as the idle hook

Questions

1) Does configuring PE as follows enable both RUN and STOP mode?  Or do I need an explicit configuration for STOP as well?

pastedImage_1.png

2) I'm aware of the `power_manager_rtos_demo` from KSDK and have seen really low power usage in STOP mode.  In the demo, there are calls to `POWER_SYS_SetMode()` when a user enters a selection.  With tickless idle and/or Processor Expert, can I expect power mode switches to happen automatically?  Or will I need to add such calls, in `vApplicationIdleHook()` for instance?

3) More generally, what is the difference between STOP and the tickless idle state?  It seems like STOP is lower power, but tickless idle is easier to use in freeRTOS.

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
2,664 Views
nickbedbury
Contributor III

Answers to my original questions:
1) The power modes need to be configured in PEX and a call to `POWER_SYS_SetMode() is used.` The example that Jing provided and I revised for the KL82Z demonstrates this.

2) Tickless idle doesn't switch modes automatically.  With the NXP KL82Z SDK, it is also not supported to perform a mode switch in the tickless idle hook.  Mode switches work best from a regular task. 

This blog goes over some of the details further, showing how custom PEX components can be used to switch power modes in hooks: Tutorial: Using the FRDM-KL25Z as Low Power Board | MCU on Eclipse  I didn't want to go this route since it would be a major overhaul of my project.

3) While tickless idle provides some power savings, using the power manager STOP/VLPS/VLLS gives even lower power for the KL82Z in my application.  I believe the power difference is partly that tickless idle just stops the SYSTICK clock while peripherals and other clocks keep running.  In STOP modes, even more clocks are disabled resulting in lower power.  (That's just a guess though.)

View solution in original post

8 Replies
2,665 Views
nickbedbury
Contributor III

Answers to my original questions:
1) The power modes need to be configured in PEX and a call to `POWER_SYS_SetMode() is used.` The example that Jing provided and I revised for the KL82Z demonstrates this.

2) Tickless idle doesn't switch modes automatically.  With the NXP KL82Z SDK, it is also not supported to perform a mode switch in the tickless idle hook.  Mode switches work best from a regular task. 

This blog goes over some of the details further, showing how custom PEX components can be used to switch power modes in hooks: Tutorial: Using the FRDM-KL25Z as Low Power Board | MCU on Eclipse  I didn't want to go this route since it would be a major overhaul of my project.

3) While tickless idle provides some power savings, using the power manager STOP/VLPS/VLLS gives even lower power for the KL82Z in my application.  I believe the power difference is partly that tickless idle just stops the SYSTICK clock while peripherals and other clocks keep running.  In STOP modes, even more clocks are disabled resulting in lower power.  (That's just a guess though.)

2,664 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi Nick,

I am using KDS3.2, but the Processor Expert does not support KL82 at all. And KSDK1.3 also doesn't support KL82. I can only import KL82 SDK2.2 example. How do you use it?

Regards,

Jing

0 Kudos
Reply
2,664 Views
nickbedbury
Contributor III

Hi Jing, you have to install a couple things like "KSDK 1.3.0 KL82Z Eclipse Update" package.  See the Getting Started guide.  Freedom Development Board for Kinetis KL82 | NXP 

0 Kudos
Reply
2,664 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi,

Thank you. But I still can't download SDK_1.3.0_FRDM-K82F_Eclipse_Update.zip. So, I tried other way.

1. I found a very good example. It shows how to set in PE clearly. https://community.nxp.com/docs/DOC-339742 

2. It shows in this example that PE only generate some power control structure. You should pass these control structure to driver by yourself.

Regards,

Jing

0 Kudos
Reply
2,665 Views
nickbedbury
Contributor III

Hi Jing,

With that example, I experience similar to what you described for KL82Z.  I think because the KL27 support isn't installed in KDS, Processor Expert gets disabled for me upon importing the example project:

pastedImage_1.png

I'm not familiar with how to convert a project to from KL27 to KL82, but working on it.

0 Kudos
Reply
2,665 Views
nickbedbury
Contributor III

Turns out there was an option under Project Properties -> Processor Expert.  I needed to re-enable editing. 

The converted project KL27 -> KL82 is attached.

0 Kudos
Reply
2,665 Views
jingpan
NXP TechSupport
NXP TechSupport

Yes, KDS support KL27 in default.

BTW, can you share me KSDK 1.3.0 KL82Z Eclipse Update?

0 Kudos
Reply
2,664 Views
nickbedbury
Contributor III

Hmm, yeah it appears the link in the Getting Started guide is broken.  The SDK tar.gz (including some projects I've built) is larger than 50MB so I cannot attach here.

0 Kudos
Reply