power_mode_switch#
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.
This demo directly controls the target power mode from the menu flow. Use the Power Manager demo when an application needs the notification framework to run callbacks before entering and after exiting a power mode, such as deinitializing and reinitializing peripherals around the transition.
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 modules 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, there would be current leakage on the pin, which will increase the power consumption.
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#
EVK-MCIMX7ULP
Hardware requirements
Micro USB cable
MCIMX7ULP-EVK board
J-Link Debug Probe
5V power supply
Personal Computer
Board settings
No special settings are required.
Please note this application can support running with Linux BSP! And gcc debug target exceeds the RAM size so it’s not available!
Prepare the Demo
Connect 5V power supply and J-Link Debug Probe to the board, switch SW1 to power on the board.
Connect a micro USB cable between the host PC and the J6 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
Generate image file with imgutil and write to QSPI flash with U-Boot. For details, please refer to Getting Started with SDK v.2.0 for i.MX 7ULP Derivatives (Doc No: SDK20IMX7ULPGSUG)
Press the reset button on your board 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, or query and set other system power behavior. The power mode switch demo need to run with Linux accordingly, so please make sure the power mode crossings between Cortex-A7 and Cortex-M4 are valid.
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.
Remarkable configuration of the application (in power_mode_switch.c): “SYSTICK_LLWU_WAKEUP”: The demo leverages LPTMR0 as systick timer, and supports FreeRTOS tickless idle. In tickless idle mode, LPTMR0 takes LPO 1kHz clock as clock source and will overflow in 65 seconds. If setting SYSTICK_LLWU_WAKEUP to “true”, it means systick can wake up system in LLS/VLLS so that OS event like task delay or semaphore timeout may wake up SoC in addition to the wakeup source selected in application menu. Even no OS event occurs, the system will be woken up from LLS/VLLS every 65 seconds also to avoid LPTMR0 overflow which leads to systick loss. If setting SYSTICK_LLWU_WAKEUP to “false”, then systick(LPTMR0) cannot wakeup SoC in LLS/VLLS. “APP_ENABLE_GPIO_PAD_LOW_POWER”: This is an IO low power switch. If setting to “1”, then the SoC IO leakage can be optimized with the limitation that only fixed voltage can be applied to the IO pads. Please read “GPIO pads operating range configuration” in Reference Manual SIM module carefully to avoid malfunction or even SoC pad damage.
Task 1 is working now
MCU wakeup source 0x6...
#################### Power Mode Switch Task ####################
Build Time: Apr 9 2021--15:24:08
Core Clock: 115200000Hz
Power mode: RUN
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: HSRUN - High Speed RUN mode
Press H for enter: LLS - Low Leakage Stop mode
Press I for enter: VLLS - Very Low Leakage Stop mode
Press Q for query CA7 core power status.
Press W for wake up CA7 core in VLLS/VLPS.
Press T for reboot CA7 core.
Press U for shutdown CA7 core.
Press V for boot CA7 core.
Press R for read PF1550 Register.
Press S for set PF1550 Register.
Press Z for enhanced power configuration.
Waiting for power mode select..
FRDM-K22F
Hardware requirements
Mini/micro USB cable
FRDMK22F board
Personal Computer
Board settings
No special settings are required.
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:
9600 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 = 80000000Hz
Power mode: RUN
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/LLS3 - 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: VLLS2 - Very Low Leakage Stop 2 mode
Press K for enter: VLLS3 - Very Low Leakage Stop 3 mode
Press L for enter: HSRUN - High Speed RUN mode
Waiting for power mode select..
FRDM-K32L2A4S
Hardware requirements
Mini/micro USB cable
FRDM-K32L2A4S board
Personal Computer
Board settings
No special board setting.
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:
9600 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 = 48000000Hz
Power mode: RUN
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/LLS3 - 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: VLLS2 - Very Low Leakage Stop 2 mode
Press K for enter: VLLS3 - Very Low Leakage Stop 3 mode
Press L for enter: HSRUN - High Speed RUN mode
Waiting for power mode select..
FRDM-K32L2B
Hardware requirements
Mini/micro USB cable
FRDMK32L2B board
Personal Computer
Board settings
No special board setting.
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:
9600 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 = 48000000Hz
Power mode: RUN
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/LLS3 - 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 power mode select..
FRDM-KE15Z
Hardware requirements
Micro USB cable
FRDM-KE15Z board
Personal Computer
Board settings
No special settings are required.
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:
9600 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 tell how to set MCU to target power mode.
NOTE: Only input when the demo asks to input, input at other time might make the debug console overflow and get wrong result.
#################### Power Mode Switch Demo ####################
Core Clock = 72000000Hz
Power mode: RUN
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
Waiting for power mode select..
FRDM-KE16Z
Hardware requirements
Micro USB cable
FRDM-KE16Z board
Personal Computer
Board settings
No special settings are required.
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:
9600 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 tell how to set MCU to target power mode.
NOTE: Only input when the demo asks to input, input at other time might make the debug console overflow and get wrong result.
#################### Power Mode Switch Demo ####################
Core Clock = 48000000Hz
Power mode: RUN
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
Waiting for power mode select..
FRDM-KE17Z
Hardware requirements
Micro USB cable
FRDM-KE17Z board
Personal Computer
Board settings
No special settings are required.
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:
9600 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 tell how to set MCU to target power mode.
NOTE: Only input when the demo asks to input, input at other time might make the debug console overflow and get wrong result.
#################### Power Mode Switch Demo ####################
Core Clock = 72000000Hz
Power mode: RUN
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
Waiting for power mode select..
FRDM-KE17Z512
Hardware requirements
Micro USB cable
FRDM-KE17Z512 board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB cable between the host PC and the MCU-LINK USB port on the target board.
Open a serial terminal with the following settings:
9600 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 tell how to set MCU to target power mode.
NOTE: Only input when the demo asks to input, input at other time might make the debug console overflow and get wrong result.
#################### Power Mode Switch Demo ####################
Core Clock = 72000000Hz
Power mode: RUN
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: HSRUN - High Speed RUN mode
Waiting for power mode select..
FRDM-MCXC041
Hardware requirements
Type-C USB cable
FRDM-MCXC041 board
Personal Computer
Board settings
No special board setting.
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:
9600 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 = 48000000Hz
Power mode: RUN
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/LLS3 - 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 power mode select..
FRDM-MCXC242
Hardware requirements
USB-C cable
FRDM-MCXC242 board
Personal Computer
Board settings
No special board setting.
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:
9600 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 = 48000000Hz
Power mode: RUN
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/LLS3 - 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 power mode select..
FRDM-MCXC444
Hardware requirements
Type-C USB cable
FRDM-MCXC444 board
Personal Computer
Board settings
No special board setting.
Prepare the Demo
Connect a type-c USB cable between the host PC and the MCU-Link USB port (J13) on the target board.
Open a serial terminal with the following settings:
9600 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 = 48000000Hz
Power mode: RUN
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/LLS3 - 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 power mode select..
FRDM-MCXE247
Hardware requirements
USB-C cable
FRDM-MCXE247 board
Personal Computer
Board settings
No special settings are required.
Prepare the Demo
Connect a USB cable between the host PC and the MCU-LINK USB port on the target board.
Open a serial terminal with the following settings:
9600 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 tell how to set MCU to target power mode.
This Power Mode Switch demo directly controls the selected MCU power mode from the menu flow. Use the Power Manager demo when an application needs notification callbacks before entering and after exiting a power mode.
NOTE: Only input when the demo asks to input, input at other time might make the debug console overflow and get wrong result.
#################### Power Mode Switch Demo ####################
Core Clock = 80000000Hz
Power mode: RUN
Select the desired operation
Press A for enter: RUN - Normal RUN mode
Press B for enter: STOP - Stop mode
Press C for enter: VLPR - Very Low Power Run mode
Press D for enter: VLPS - Very Low Power Stop mode
Press E for enter: HSRUN - High Speed RUN mode
Waiting for power mode select..
When VLPS mode is selected and the configured wakeup event occurs, the debug console prints:
Entered VLPS mode and woke up.
Next loop
FRDM-RW612
Hardware requirements
USB-C cable
FRDM-RW612 board
Personal Computer
Board settings
No special settings
Prepare the Demo
Connect a USB-C cable between the PC host and the MCU-Link USB port (J10) on the 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.
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 (PM0 - Active, PM1 - Idle, PM2 - Standby, PM3 - Sleep, PM4 - Deep Sleep). 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.
Note: On FRDM-RW612 board, the SW2 is connected to GPIO 11, which is not AON pin. So no pin wakeup in sleep modes.
Here’s the initial menu when running successfully.
MCU wakeup source 0x0...
#################### Power Mode Switch ####################
Build Time: Mar 2 2022--10:11:47
Core Clock: 260000000Hz
Select the desired operation
Press 0 for enter: PM0 - Active
Press 1 for enter: PM1 - Idle
Press 2 for enter: PM2 - Standby
Press 3 for enter: PM3 - Sleep
Press 4 for enter: PM4 - Deep Sleep
Waiting for power mode select..
1
Select the wake up source:
Press T for RTC.
Press 2 for wakeup gpio pin(SW2).
Press U for UART wakeup.
Waiting for key press..
t
Select the wake up timeout in seconds.
The allowed range is 1s ~ 99s.
Eg. enter 05 to wake up in 5 seconds.
Waiting for input timeout value...
03
RTC wake up after 3 seconds.
Woken up by RTC
Exit from power mode 1
#################### Power Mode Switch ####################
Build Time: Mar 2 2022--10:11:47
Core Clock: 260000000Hz
Select the desired operation
Press 0 for enter: PM0 - Active
Press 1 for enter: PM1 - Idle
Press 2 for enter: PM2 - Standby
Press 3 for enter: PM3 - Sleep
Press 4 for enter: PM4 - Deep Sleep
Waiting for power mode select..
3
Select the wake up source:
Press T for RTC.
Waiting for key press..
t
Select the wake up timeout in seconds.
The allowed range is 1s ~ 99s.
Eg. enter 05 to wake up in 5 seconds.
Waiting for input timeout value...
02
RTC wake up after 2 seconds.
Woken up by RTC
Exit from power mode 3
#################### Power Mode Switch ####################
Build Time: Mar 2 2022--10:11:47
Core Clock: 260000000Hz
Select the desired operation
Press 0 for enter: PM0 - Active
Press 1 for enter: PM1 - Idle
Press 2 for enter: PM2 - Standby
Press 3 for enter: PM3 - Sleep
Press 4 for enter: PM4 - Deep Sleep
Waiting for power mode select..
4
Select the wake up source:
Press T for RTC.
Waiting for key press..
t
Select the wake up timeout in seconds.
The allowed range is 1s ~ 99s.
Eg. enter 05 to wake up in 5 seconds.
Waiting for input timeout value...
02
RTC wake up after 2 seconds.
MCU wakeup source 0x0...
#################### Power Mode Switch ####################
Build Time: Mar 2 2022--10:11:47
Core Clock: 260000000Hz
Select the desired operation
Press 0 for enter: PM0 - Active
Press 1 for enter: PM1 - Idle
Press 2 for enter: PM2 - Standby
Press 3 for enter: PM3 - Sleep
Press 4 for enter: PM4 - Deep Sleep
Waiting for power mode select..
RD-RW612-BGA
Hardware requirements
Micro USB cable
RD-RW612-BGA board
Personal Computer
Board settings
Ensure R148 is removed. Ensure R520 is removed, R518 is installed to make SW4 work. U38 DIP 1,2,3,4 all off HD12 1-2, 3-4 connected JP31 1-2 connected JP34 2-3 connected JP39 2-3 connected
Prepare the Demo
Connect a micro USB cable between the PC host and the MCU-Link USB port (J7) on the 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.
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 (PM0 - Active, PM1 - Idle, PM2 - Standby, PM3 - Sleep, PM4 - Deep Sleep). 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.
Here’s the initial menu when running successfully.
MCU wakeup source 0x0...
#################### Power Mode Switch ####################
Build Time: Mar 2 2022--10:11:47
Core Clock: 260000000Hz
Select the desired operation
Press 0 for enter: PM0 - Active
Press 1 for enter: PM1 - Idle
Press 2 for enter: PM2 - Standby
Press 3 for enter: PM3 - Sleep
Press 4 for enter: PM4 - Deep Sleep
Waiting for power mode select..
1
Select the wake up source:
Press T for RTC.
Press 1 for wakeup pin1(SW4).
Press U for UART wakeup.
Waiting for key press..
t
Select the wake up timeout in seconds.
The allowed range is 1s ~ 99s.
Eg. enter 05 to wake up in 5 seconds.
Waiting for input timeout value...
03
RTC wake up after 3 seconds.
Woken up by RTC
Exit from power mode 1
#################### Power Mode Switch ####################
Build Time: Mar 2 2022--10:11:47
Core Clock: 260000000Hz
Select the desired operation
Press 0 for enter: PM0 - Active
Press 1 for enter: PM1 - Idle
Press 2 for enter: PM2 - Standby
Press 3 for enter: PM3 - Sleep
Press 4 for enter: PM4 - Deep Sleep
Waiting for power mode select..
3
Select the wake up source:
Press T for RTC.
Press 1 for wakeup pin1(SW4).
Waiting for key press..
1
Push wakeup PIN1 to wake up.
MCU wakeup source 0x0...
#################### Power Mode Switch ####################
Build Time: Mar 2 2022--10:11:47
Core Clock: 260000000Hz
Select the desired operation
Press 0 for enter: PM0 - Active
Press 1 for enter: PM1 - Idle
Press 2 for enter: PM2 - Standby
Press 3 for enter: PM3 - Sleep
Press 4 for enter: PM4 - Deep Sleep
Waiting for power mode select..
4
Select the wake up source:
Press T for RTC.
Press 1 for wakeup pin1(SW4).
Waiting for key press..
t
Select the wake up timeout in seconds.
The allowed range is 1s ~ 99s.
Eg. enter 05 to wake up in 5 seconds.
Waiting for input timeout value...
02
RTC wake up after 2 seconds.
MCU wakeup source 0x0...
#################### Power Mode Switch ####################
Build Time: Mar 2 2022--10:11:47
Core Clock: 260000000Hz
Select the desired operation
Press 0 for enter: PM0 - Active
Press 1 for enter: PM1 - Idle
Press 2 for enter: PM2 - Standby
Press 3 for enter: PM3 - Sleep
Press 4 for enter: PM4 - Deep Sleep
Waiting for power mode select..
TWR-KM34Z50MV3
Hardware requirements
Mini USB cable
TWR-KM34Z50MV3 board
Personal Computer
Board settings
No special board setting.
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:
9600 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 = 47972352Hz
Power mode: RUN
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: VLLS0 - Very Low Leakage Stop 0 mode
Press H for enter: VLLS1 - Very Low Leakage Stop 1 mode
Press I for enter: VLLS2 - Very Low Leakage Stop 2 mode
Press J for enter: VLLS3 - Very Low Leakage Stop 3 mode
Waiting for power mode select..
TWR-KM34Z75M
Hardware requirements
Mini USB cable
TWR-KM34Z75M board
Personal Computer
Board settings
No special board setting.
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:
9600 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 = 71991296Hz
Power mode: RUN
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: VLLS0 - Very Low Leakage Stop 0 mode
Press H for enter: VLLS1 - Very Low Leakage Stop 1 mode
Press I for enter: VLLS2 - Very Low Leakage Stop 2 mode
Press J for enter: VLLS3 - Very Low Leakage Stop 3 mode
Waiting for power mode select..
TWR-KM35Z75M
Hardware requirements
Micro USB cable
TWR-KM35Z75M board
Personal Computer
Board settings
No special board setting.
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:
9600 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 = 71991296Hz
Power mode: RUN
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: VLLS0 - Very Low Leakage Stop 0 mode
Press H for enter: VLLS1 - Very Low Leakage Stop 1 mode
Press I for enter: VLLS2 - Very Low Leakage Stop 2 mode
Press J for enter: VLLS3 - Very Low Leakage Stop 3 mode
Waiting for power mode select..