Kinetis SDK v.1.2 Demo Applications User's Guide  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Power Manager HAL Demo

Overview

The Power Manager demo application demonstrates different Power Manager modes supported by the Kinetis SoCs. The set of supported low power modes and their transition possibility differ platform to platform. See section: "System Mode Controller" in a Reference Manual for each Kinetis sub-family microcontroller.

Supported Hardware

These Freescale Freedom development platforms and Tower System modules are supported by the Kinetis software development kit Power Manager demo.

System Requirement

Hardware requirements

Toolchain requirements

Software requirements

Getting Started

Hardware Settings

The demo does not require any special hardware configurations. Although not required, the recommendation is to leave the development board jumper settings and configurations in default state when running this demo.

Prepare the Demo

Follow the instructions in Getting Started with Kinetis Software Development Kit (KSDK) to:

Note: The demo is configured to work with the Terminal baudrate at 9600 bps. When running the demo, unplug all debugger devices.

Run the demo

  1. Press the reset button on the hardware.
  2. A control menu will displayed on the Terminal window. Note that the list on the menu is not the same for all platforms.

It depends on the list of supported low power modes. For example, on the TWR-K64F120M, this menu displays:

############# Power Manager Demo
Core Clock = 48000000Hz 

SMC mode = kStatRun
Select the desired operation
Press  A for enter: RUN   - Normal RUN mode
Press  B for enter: Wait  - Wait mode
Press  C for enter: Stop  - Stop mode
Press  D for enter: VLPR  - Very Low Power Run mode
Press  E for enter: VLPW  - Very Low Power Wait mode
Press  F for enter: VLPS  - Very Low Power Stop mode
Press  G for enter: LLS   - Low Leakage Stop mode
Press  H for enter: VLLS0 - Very Low Leakage Stop 0 mode
Press  I for enter: VLLS1 - Very Low Leakage Stop 1 mode
Press  J for enter: VLLS3 - Very Low Leakage Stop 3 mode
Waiting for key to be pressed...
    
  1. Enter a command by pressing the corresponding input key. If the user enters an invalid mode transition, the demo displays this message on the terminal window:
    Cannot go from RUN to VLPW directly.
    Next loop
        
    In most valid mode transitions, the SoC wakes up after receiving the RTC alarm or the GPIO switch trigger. However, in some modes, the SoC only accepts either RTC alarm or the GPIO switch trigger. In that case, the demo prints the following message on the terminal: Note: On the FRDM-KL25Z, FRDM-KL26Z and FRDM-KL46Z, the RTC counter is fed without the 32Khz (OSC32KCLK) clock. Therefore the accuracy of RTC alarms will be impacted.
    The board does not support wake up from this mode by RTC due to disabled External reference.
    Entering Very Low Leakage Stop 0 mode, press the SW1 button to wake up.
    Wake up goes through Reset sequence.
        

Supported Low Power Modes By Platform

This table shows the supported modes on different platforms:

Platform Supported Power Modes Wakeup Sources
FRDM-K22F, TWR-K22F120M WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS3, VLLS0, VLLS1, VLLS2, VLLS3, RUN(80MHz), HSRUN(80MHz) RTC, SW1
FRDM-K64F, TWR-K64F120M WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS2, VLLS3, RUN(120MHz) RTC, SW1
FRDM-KL03Z48M WAIT, STOP, VLPR(1MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS2, VLLS3, RUN(48MHz) RTC, SW2
FRDM-KL25Z WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS3, RUN(48MHz) RTC, PTD6 J2-17 to VSS J9-14
FRDM-KL26Z WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS3, RUN(48MHz) RTC, SW2
FRDM-KL27Z WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS3, RUN(48MHz) RTC, SW3
FRDM-KL43Z WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS3, RUN(48MHz) RTC, SW3
FRDM-KL46Z WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS3, RUN(48MHz) RTC, SW1
FRDM-KW24 WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS3, RUN(48MHz) RTC, SW1
TWR-K21D50M WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS3, RUN(48MHz) RTC, SW1
TWR-K24F120M WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS2, VLLS3, RUN(48MHz) RTC, SW2
TWR-K60D100M WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS1, VLLS2, VLLS3, RUN(100MHz) RTC, SW1
TWR-K65F180M WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS3, VLLS0, VLLS1, VLLS2, VLLS3, RUN(120MHz), HSRUN(180MHz) RTC, SW1
TWR-KW24D512 WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS3, RUN(48MHz) RTC, SW1
TWR-K21F120M WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS2, VLLS3, RUN(120MHz)

RTC, SW3

TWR-KL43Z48M WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS3, RUN(48MHz) RTC, SW2
TWR-KV10Z32 WAIT, STOP, VLPR(4MHz), VLPW, VLPS, VLLS0, VLLS1, VLLS3, RUN(75MHz) RTC, SW2
TWR-KV31F120M WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS2, VLLS3, RUN(80MHz), HSRUN(120MHz) RTC, SW1

This demo application demonstrates how to use the Power Manager.

Overview

The Power Manager demo application demonstrates different Power Manager modes supported by the Kinetis SoCs. The set of supported low power modes and their transition possibility differ platform to platform. See section: "System Mode Controller" in a Reference Manual for each Kinetis Sub-family microcontroller.

Supported RTOS

Supported Hardware

These Freescale Freedom development platforms and Tower System modules are supported by the Kinetis software development kit Power Manager demo.

The Bare Metal (no RTOS) demo Supported Platforms:

The FreeRTOS, Freescale MQX™ RTOS, µC/OS-II, µC/OS-III demo Supported Platforms:

System Requirements

Hardware requirements

Toolchain requirements

Software requirements

Getting Started

Hardware Settings

The demo does not require any special hardware configurations. Although not required, the recommendation is to leave the development board jumper settings and configurations in default state when running this demo.

Prepare the Demo

Follow the instructions in Getting Started with Kinetis Software Development Kit (KSDK) to:

Note: The demo is configured to work with the Terminal baudrate at 9600 bps. When running the demo, unplug all debugger devices.

Run the demo

  1. Press the reset button on the hardware.
  2. A control menu will displayed on the Terminal window. Note that the list on the menu is not the same for all platforms. It depends on the list of supported low power modes. For example, on the TWR-K64F120M, this menu displays:
    ############## Power Manager Demo
Core Clock = 48000000Hz 

SMC mode = kStatRun
Select the desired operation
Press  A for enter: RUN   - Normal RUN mode
Press  B for enter: Wait  - Wait mode
Press  C for enter: Stop  - Stop mode
Press  D for enter: VLPR  - Very Low Power Run mode
Press  E for enter: VLPW  - Very Low Power Wait mode
Press  F for enter: VLPS  - Very Low Power Stop mode
Press  G for enter: LLS   - Low Leakage Stop mode
Press  H for enter: VLLS0 - Very Low Leakage Stop 0 mode
Press  I for enter: VLLS1 - Very Low Leakage Stop 1 mode
Press  J for enter: VLLS3 - Very Low Leakage Stop 3 mode
Waiting for key to be pressed...
    
  1. Enter a command by pressing the corresponding input key. If the user enters an invalid mode transition, the demo displays this message on the terminal window:
    Cannot go from RUN to VLPW directly.
    Next loop
        
    In most valid mode transitions, the SoC wakes up after receiving the RTC alarm or the GPIO switch trigger. However, in some modes, the SoC only accepts either RTC alarm or the GPIO switch trigger. In that case, the demo prints the following message on the terminal: Note: On the FRDM-KL25Z, FRDM-KL26Z and FRDM-KL46Z, the RTC counter is fed without the 32Khz (OSC32KCLK) clock. Therefore the accuracy of RTC alarms will be impacted.
    The board does not support wake up from this mode by RTC due to disabled External reference.
    Entering Very Low Leakage Stop 0 mode, press the SW1 button to wake up.
    Wake up goes through Reset sequence.
        

Supported Low Power Modes By Platform

This table shows the supported modes on different platforms:

Platform Supported Power Modes Wakeup Sources
FRDM-K22F, TWR-K22F120M WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS3, VLLS0, VLLS1, VLLS2, VLLS3, RUN(80MHz), HSRUN(80MHz) RTC, SW1
FRDM-K64F, TWR-K64F120M WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS2, VLLS3, RUN(120MHz) RTC, SW1
FRDM-KL03Z48M WAIT, STOP, VLPR(1MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS2, VLLS3, RUN(48MHz) RTC, SW2
FRDM-KL25Z WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS3, RUN(48MHz) RTC, PTD6 J2-17 to VSS J9-14
FRDM-KL27Z WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS3, RUN(48MHz) RTC, SW3
FRDM-KL43Z WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS3, RUN(48MHz) RTC, SW3
FRDM-KL46Z WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS3, RUN(48MHz) RTC, SW1
FRDM-KW24 WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS3, RUN(48MHz) RTC, SW1
TWR-K21D50M WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS3, RUN(48MHz) RTC, SW1
TWR-K24F120M WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS2, VLLS3, RUN(48MHz) RTC, SW2
TWR-K60D100M WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS1, VLLS2, VLLS3, RUN(100MHz) RTC, SW1
TWR-K65F180M WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS3, VLLS0, VLLS1, VLLS2, VLLS3, RUN(120MHz), HSRUN(180MHz) RTC, SW1
TWR-KW24D512 WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS3, RUN(48MHz) RTC, SW1
TWR-K21F120M WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS2, VLLS3, RUN(120MHz)

RTC, SW3

TWR-KL43Z48M WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS3, RUN(48MHz) RTC, SW2
TWR-KV31F120M WAIT, STOP, VLPR(4MHz), VLPW, VLPS, LLS, VLLS0, VLLS1, VLLS2, VLLS3, RUN(80MHz), HSRUN(120MHz) RTC, SW1