MCUXpresso_LPC804/boards/lpcxpresso804/demo_apps/power_mode_switch_lpc
Yilin Sun 28c7a119e9
Updated to SDK v2.15.000
Signed-off-by: Yilin Sun <imi415@imi.moe>
2024-01-29 14:45:13 +08:00
..
armgcc Updated to SDK v2.15.000 2024-01-29 14:45:13 +08:00
board.c Initial commit v2.13.0 2023-05-25 15:51:41 +08:00
board.h Initial commit v2.13.0 2023-05-25 15:51:41 +08:00
clock_config.c Initial commit v2.13.0 2023-05-25 15:51:41 +08:00
clock_config.h Initial commit v2.13.0 2023-05-25 15:51:41 +08:00
pin_mux.c Initial commit v2.13.0 2023-05-25 15:51:41 +08:00
pin_mux.h Initial commit v2.13.0 2023-05-25 15:51:41 +08:00
power_mode_switch_lpc_v3_14.xml Updated to SDK v2.15.000 2024-01-29 14:45:13 +08:00
power_mode_switch_lpc.bin Updated to SDK v2.15.000 2024-01-29 14:45:13 +08:00
power_mode_switch_lpc.c Initial commit v2.13.0 2023-05-25 15:51:41 +08:00
power_mode_switch_lpc.mex Initial commit v2.13.0 2023-05-25 15:51:41 +08:00
readme.txt Initial commit v2.13.0 2023-05-25 15:51:41 +08:00

## Overview
-----------------------------------------------------------------------------------------
The power_mode_switch_lpc application shows the usage of normal power mode control APIs for entering the four kinds of
low power mode: Sleep mode, Deep Sleep mode and Power Down mode, deep power down mode. When the application runs to each low power
mode, the device would cut off the power for specific modules to save energy. The device can be also waken up by
prepared wakeup source from external event.

## Functional description
-----------------------------------------------------------------------------------------
This demo is to show how the various power mode can switch to each other.
There is one known issue that terminal may receive mess code after enter deep power down mode, it is caused by 
the uart TX pin state changed by the MCU under deep power down mode. As the RM says, all the functional pins are 
tri-stated in deep power down mode except for the WAKEUP pin. So the state change will be captured by
the virtual com port as mess code. Software has no workaround for the issue. 
Note:
The power consumption data for Sleep mode can reach 0.4mA. 
The power consumption data for Deep Sleep mode can reach 100uA. 
The power consumption data for Power Down mode can reach 9uA. If want to reach 6uA, please disable LPOsc.
The power consumption data for Deep Power Down mode can reach 0.15uA. 

## Toolchain supported
---------------------
- IAR embedded Workbench 8.50.5
- Keil MDK 5.31
- GCC ARM Embedded  9.2.1
- MCUXpresso 11.2.0

## Hardware Requirements
------------------------
- Mini/micro USB cable
- LPCXpresso804 board
- Personal Computer

## Board Settings
------------------------
No special settings are required.

## Run the Demo
------------------------
1. Connect a micro USB cable between the PC host and the CMSIS DAP port(J4 on the board).

2. Open a serial terminal with the following settings:
   - 9600 baud rate
   - 8 data bits
   - No parity
   - One stop bit
   - No flow control

3. Choose an IDE, building the project and download the program to the target board.
   More information about how to compile and program the project can refer to the 

   [Getting Started with MCUXpresso SDK](../../../../docs/Getting Started with MCUXpresso SDK.pdf).

4. Launch the debugger in your IDE to begin running the demo.

## Expected Result
------------------------
Power mode switch Demo for LPC8xx.

Selecct an option

	1. Sleep mode

	2. Deep Sleep mode

	3. Power Down mode

	4. Deep power down mode
/* after select power mode, terminal will output */
Select wakeup source

	1. S1,wakeup key

	2. Wkt timer

	3. S3, reset key
/* after wakeup, terminal will output */
Wakeup.