MCUXpresso SDK API Reference Manual  Rev 2.16.100
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Framework: Power Manager Framework

Overview

This document consists of sections titled with Framework Overview, Data Structures, Enumerations, Functions, etc., each with an overview list and detailed documentation. It is recommended to read the Framework Overview first for it includes a comprehensive description of the framework. Other sections give detailed information for APIs, enums, macros, etc., for your further reference.

Macros

#define AT_ALWAYS_ON_DATA(var)   var
 

Framework Overview

The power manager framework manages the transition of both active-to-sleep and sleep-to-active states of the MCU. More...
 

Macro Definition Documentation

#define AT_ALWAYS_ON_DATA (   var)    var

It provides the upper layer software the ability to set and release constraints of the hardware basic resources(such as clock, power, ram, etc.) and the ability to register callback functions to be invoked before entering/after exiting the sleep mode. In addition, the upper layer software can register the wakeup source service function to be executed if related wakeup source occurs.

         +-----------------------------------------------------------------+
         |                       Application Software                      |
         +-----------------------------------------------------------------+
         +-----------------------------------------------------------------+
         |                       Stacks and Components                     |
         +-----------------------------------------------------------------+
         +-----------------------------------------------------------------+
         |                       Power Manager Framework                   |
         +-----------------------------------------------------------------+
         +---------------+    +---------------+    +-----------------------+
         | Power Drivers |    | Clock Drivers |    | Wakeup Source Drivers |
         +---------------+    +---------------+    +-----------------------+

As shown above, the power manager framework safely manages the transitions to and from power saving states by using MCUXpresso SDK drivers, and the upper layer software only need to use the APIs of power manager framework. Different MCUs have the same top-level APIs, concepts and conventions.

Definitions and Terms:

  • Constraint A system-level declaration that asks the power manager to prevent a specific action. For example, if the application sets the constraint as that the ARM PLL should not be turned off, then the power manager framework will compute the deepest power state with the ARM PLL being turned on. Otherwise, a decision might be made to transit to a sleep state with ARM PLL being turned off.
  • Notification A callback mechanism that allows the upper layer software to be notified of specific power transitions. Some hardware peripherals may need several steps to enter into or exit the low power mode, so multiple callbacks are necessary to avoid undesired waiting loop. To address this problem, there are 3 groups of notification set in the power manager framework. The power manager will execute registered notification callback functions from group0 to group2 before entering into low power mode while from group2 to group0 after exiting from low power mode.
  • Wakeup Source Structure that contains the wakeup source Id and its service functions. The upper layer software can create the wakeup source object by invoking PM_RegisterWakeupSource() function. The parameter wsId is the MCU wakeup source definition available. If the MCU exits from the low power mode based on the registered wakeup source, the function PM_TriggerWakeSourceService() should be invoked to execute wakeup source service function.

Power Manager Framework Architecture:

The power manager framework consists of four modules: policy module, sequencer module, wakeup source manager module, and notification module.

  • The policy module can gather all the constraints from the whole system and then compute the deepest allowed power state.
  • The sequencer module is in charge of the power mode entry and exit sequences.
  • The wakeup source manager module is in charge of configuring wakeup sources in low power entry and processing registered wakeup source handler callback.
  • The notification module is in charge of notifying the upper layer software of speciic power transitions and events.

To make the power manager framework adapts to different MCU families, the power manager framework adopts a layer-designed idea, extracting common parts as the pm_core level, and separating device-related parts as the pm_device level. In details, the pm_core level contains policy module, wakeup source manager module, and notification module. The pm_device level contains sequencer module.