power_mode_switch_k4#
Overview#
The Power mode switch demo application demonstrates the use of power modes in the KSDK. The demo prints the power mode menu through the debug console, where the user can set the MCU to a specific power mode. The user can also set the wakeup 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 wakeup source and wakeup the MCU from low power modes.
Tips: This demo is to show how the various power mode can switch to each other. However, in actual low power use case, to save energy and reduce the consumption even more, many things can be done including:
Disable the clock for unnecessary module during low power mode. That means, programmer can disable the clocks before entering the low power mode and re-enable them after exiting the low power mode when necessary.
Disable the function for unnecessary part of a module when other part would keep working in low power mode. At the most time, more powerful function means more power consumption. For example, disable the digital function for the unnecessary pin mux, and so on.
Set the proper pin state (direction and logic level) according to the actual application hardware. Otherwise, the pin current would be activated unexpectedly waste some energy.
Other low power consideration based on the actual application hardware.
Debug pins(e.g SWD_DIO) would consume addtional power, had better to disable related pins or disconnect them.
Supported Boards#
FRDM-MCXW71
Hardware requirements
Type-C USB cable
FRDM-MCXW71 Board
Personal Computer
Board settings
To wakeup the chip via VBAT, please press the SW5, and the falling edge will wakeup the chip.
The default connection of SH105 is 1-2. To test PowerSwitchOff mode, please short 2-3 of SH105. To test other modes, please short 1-2 of SH105.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
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: 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.
########################### Power Mode Switch Demo ###########################
Core Clock = 96000000Hz
Power mode: Active
Please Select the desired power mode:
Press A to enter Active mode!
Press B to enter Sleep1 mode!
Press C to enter DeepSleep1 mode!
Press D to enter DeepSleep2 mode!
Press E to enter DeepSleep3 mode!
Press F to enter DeepSleep4 mode!
Press G to enter PowerDown1 mode!
Press H to enter PowerDown2 mode!
Press I to enter PowerDown3 mode!
Press J to enter PowerDown4 mode!
Press K to enter DeepPowerDown1 mode!
Press L to enter DeepPowerDown2 mode!
Press M to enter PowerSwitchOff mode!
Waiting for power mode select...
FRDM-MCXW72
Hardware requirements
Type-C USB cable
FRDM-MCXW72 Board
Personal Computer
Board settings
To wakeup the chip via VBAT, please press SW5, and the falling edge will wakeup the chip.
To test PowerSwitchOff(Smart power switch) mode, cut the SH9 trace between P3V3_DUT and VDD_REG, then populate a 0-ed ohm resistor in SH9 to connect VDD_REG and VOUT_SWITCH nodes.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
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: 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.
########################### Power Mode Switch Demo ###########################
Core Clock = 96000000Hz
Power mode: Active
Please Select the desired power mode:
Press A to enter Active mode!
Press B to enter Sleep1 mode!
Press C to enter DeepSleep1 mode!
Press D to enter DeepSleep2 mode!
Press E to enter DeepSleep3 mode!
Press F to enter DeepSleep4 mode!
Waiting for power mode select...
KW45B41Z-EVK
Hardware requirements
Mini/micro USB cable
KW45B41Z-EVK Board
Personal Computer
Board settings
To wakeup the chip via VBAT, please connect a signal to TP1, and the falling edge will wakeup the chip.
To test PowerSwitchOff mode, please remove jumper for JP6(1-2) and short JP6(2-3), but to test other modes please short JP6(1-2).
The data of power consumption is measured on KW45B41Z-EVK RevD JP5(3-4) which is in DCDC mode.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
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: 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.
########################### Power Mode Switch Demo ###########################
Core Clock = 96000000Hz
Power mode: Active
Please Select the desired power mode:
Press A to enter Active mode!
Press B to enter Sleep1 mode!
Press C to enter DeepSleep1 mode!
Press D to enter DeepSleep2 mode!
Press E to enter DeepSleep3 mode!
Press F to enter DeepSleep4 mode!
Press G to enter PowerDown1 mode!
Press H to enter PowerDown2 mode!
Press I to enter PowerDown3 mode!
Press J to enter PowerDown4 mode!
Press K to enter DeepPowerDown1 mode!
Press L to enter DeepPowerDown2 mode!
Press M to enter PowerSwitchOff mode!
Waiting for power mode select...
KW47-EVK
Hardware requirements
Type-C USB cable
KW47-EVK Board
Personal Computer
Board settings
To wakeup the chip via VBAT, please connect a signal to TP1 or press SW5, and the falling edge will wakeup the chip.
To test PowerSwitchOff(Smart power switch) mode, cut the SH9 trace between P3V3_DUT and VDD_REG, then populate a 0-ed ohm resistor in SH9 to connect VDD_REG and VOUT_SWITCH nodes.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
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: 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.
########################### Power Mode Switch Demo ###########################
Core Clock = 96000000Hz
Power mode: Active
Please Select the desired power mode:
Press A to enter Active mode!
Press B to enter Sleep1 mode!
Press C to enter DeepSleep1 mode!
Press D to enter DeepSleep2 mode!
Press E to enter DeepSleep3 mode!
Press F to enter DeepSleep4 mode!
Waiting for power mode select...
KW47-LOC
Hardware requirements
Type-C USB cable
KW47-LOC Board
Personal Computer
Board settings
To wakeup the chip via VBAT, please connect a signal to TP4, and the falling edge will wakeup the chip.
To test PowerSwitchOff(Smart power switch) mode, cut the SH9 trace between P3V3_DUT and VDD_REG, then populate a 0-ed ohm resistor in SH9 to connect VDD_REG and VOUT_SWITCH nodes.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
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: 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.
########################### Power Mode Switch Demo ###########################
Core Clock = 96000000Hz
Power mode: Active
Please Select the desired power mode:
Press A to enter Active mode!
Press B to enter Sleep1 mode!
Press C to enter DeepSleep1 mode!
Press D to enter DeepSleep2 mode!
Press E to enter DeepSleep3 mode!
Press F to enter DeepSleep4 mode!
Waiting for power mode select...
MCX-W72-EVK
Hardware requirements
Type-C USB cable
MCX-W72-EVK Board
Personal Computer
Board settings
To wakeup the chip via VBAT, please connect a signal to TP1 or press SW5, and the falling edge will wakeup the chip.
To test PowerSwitchOff(Smart power switch) mode, cut the SH9 trace between P3V3_DUT and VDD_REG, then populate a 0-ed ohm resistor in SH9 to connect VDD_REG and VOUT_SWITCH nodes.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
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: 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.
########################### Power Mode Switch Demo ###########################
Core Clock = 96000000Hz
Power mode: Active
Please Select the desired power mode:
Press A to enter Active mode!
Press B to enter Sleep1 mode!
Press C to enter DeepSleep1 mode!
Press D to enter DeepSleep2 mode!
Press E to enter DeepSleep3 mode!
Press F to enter DeepSleep4 mode!
Waiting for power mode select...
MCX-W71-EVK
Hardware requirements
Type-C USB cable
MCX-W71-EVK Board
Personal Computer
Board settings
To wakeup the chip via VBAT, please press the SW5, and the falling edge will wakeup the chip.
The default connection of SH105 is 1-2. To test PowerSwitchOff mode, please short 2-3 of SH105. To test other modes, please short 1-2 of SH105.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
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: 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.
########################### Power Mode Switch Demo ###########################
Core Clock = 96000000Hz
Power mode: Active
Please Select the desired power mode:
Press A to enter Active mode!
Press B to enter Sleep1 mode!
Press C to enter DeepSleep1 mode!
Press D to enter DeepSleep2 mode!
Press E to enter DeepSleep3 mode!
Press F to enter DeepSleep4 mode!
Press G to enter PowerDown1 mode!
Press H to enter PowerDown2 mode!
Press I to enter PowerDown3 mode!
Press J to enter PowerDown4 mode!
Press K to enter DeepPowerDown1 mode!
Press L to enter DeepPowerDown2 mode!
Press M to enter PowerSwitchOff mode!
Waiting for power mode select...
MCXW72-LOC
Hardware requirements
Type-C USB cable
MCXW72-LOC Board
Personal Computer
Board settings
To wakeup the chip via VBAT, please connect a signal to TP4, and the falling edge will wakeup the chip.
To test PowerSwitchOff(Smart power switch) mode, cut the SH9 trace between P3V3_DUT and VDD_REG, then populate a 0-ed ohm resistor in SH9 to connect VDD_REG and VOUT_SWITCH nodes.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
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: 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.
########################### Power Mode Switch Demo ###########################
Core Clock = 96000000Hz
Power mode: Active
Please Select the desired power mode:
Press A to enter Active mode!
Press B to enter Sleep1 mode!
Press C to enter DeepSleep1 mode!
Press D to enter DeepSleep2 mode!
Press E to enter DeepSleep3 mode!
Press F to enter DeepSleep4 mode!
Waiting for power mode select...
FRDM-KW43
FRDM-KW43 Power Mode Switch
Hardware requirements
Type-C USB cable
FRDM-KW43 Board
Personal Computer
Board settings
This demo does not require special jumper changes for the default LPTMR and SW3 wakeup flows.
Prepare the Demo
Connect a USB cable between the host PC and the FRDM board J28.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
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.
Use LPTMR or SW4 as the wakeup source when prompted by the console.
NOTE: 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.
########################### Power Mode Switch Demo ###########################
Core Clock = 96000000Hz
Power mode: Active
Please Select the desired power mode:
Press A to enter Active mode!
Press B to enter Sleep1 mode!
Press C to enter DeepSleep1 mode!
Press D to enter DeepSleep2 mode!
Press E to enter DeepSleep3 mode!
Press F to enter DeepSleep4 mode!
Press G to enter PowerDown1 mode!
Press H to enter PowerDown2 mode!
Press I to enter PowerDown3 mode!
Press J to enter PowerDown4 mode!
Press K to enter DeepPowerDown1 mode!
Press L to enter DeepPowerDown2 mode!
Waiting for power mode select...