MCUXpresso SDK Documentation

power_mode_switch_ll_mcxc

power_mode_switch_ll_mcxc#

Overview#

The power_mode_switch_ll demo application demonstrates the usage of low level power-related drivers(SPC, CMC, VBAT, WUU, and so on) to enter/exit different power modes. - WUU: Help pins and modules generate a temporary wake-up from Power Down or Deep Power Down mode. - CMC: Provide the sequencing of the CPU and associated logic through the different modes. - SPC: System power controller which is used to configure on-chip regulators in active/low-power modes.

The demo prints the power mode menu through the debug console, where the users can set the MCU to a specific power modes. Users can also select the wake-up source by following the debug console prompts. The purpose of this demo is to show how to switch between different power modes, and how to configure a wake-up source and wakeup the MCU from low power modes.

This demo demonstrates 4 level power modes: - Sleep: CPU clock is off, and the system clock and bus clock remain on. Most modules can remain operational. - Deep Sleep: Core, system, and bus clock are all off, some modules can remain operational with low power asynchronous clock source and serve as wake-up sources. - Power Down: Core, system, and bus clock are all off, the CORE power domain is put into retention mode which means modules in these domains are not operational. - Deep Power Down: The whole CORE domain is power gated. Both LDO_CORE is turn off. The device wakes from Deep Power Down mode through the Reset routine. This demo demonstrates 2 wake-up sources: - Timer: Located in System power domain, clocked by FRO16K which from VBAT. The timer is also enabled in WUU to wake-up device from power down and deep power down modes. - Button: The external pin which connected to WUU.

Supported Boards#

FRDM-MCXC162
Hardware requirements
  • Type-C USB cable

  • FRDM-MCXC162 board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB Type-C cable between the host PC and the MCU-Link USB port on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

when running the demo, the debug console shows the menu to command the MCU to the target power mode.

NOTE: 1.Only input when the demo asks for input. Input entered at any other time might cause the debug console to overflow and receive the wrong input value. 2. Wake-up from Deep Power Down mode through wakeup reset that will reset the program(“Normal Boot” will be printed).

Normal Boot.

###########################    Power Mode Switch Demo    ###########################
    Core Clock = 180000000Hz
    Power mode: Active

Select the desired operation

        Press A to enter: Active mode
        Press B to enter: Sleep mode
        Press C to enter: DeepSleep mode
        Press D to enter: PowerDown mode
        Press E to enter: DeepPowerDown mode

Waiting for power mode select...