The Power Management example demonstrates how to use the Power Management library.
You can find the source code and the project file of the example in the following folder: <InstallFolder>\examples\peripheral\pwr_mgmt
Testing
Test the Power Management Example application by performing the following steps:
- Compile and program the application.
- Start a terminal emulator like PuTTY and connect to the used COM port with the following UART settings:
-
Baud rate: 115.200
-
8 data bits
-
1 stop bit
-
No parity
-
HW flow control: None
This example supports four different use cases:
Automatic System OFF
- After the configured time of inactivity, the application will switch to System OFF state. You can postpone this process by pressing Button 1 or Button 4.
- This process will be blocked if application is not ready. By default, it is not ready.
- Pressing Button 1 will toggle the ready status.
Software Reset
- Pressing Button 3 will reset the application (if it is ready).
- Pressing Button 1 will toggle the ready status.
Go to System OFF
- Shortly press Button 2 to immediately switch to System OFF state (if the application is ready), without waiting for timeout.
- Pressing Button 1 will toggle the ready status.
- Wake up the application from System OFF by pressing Button 2.
- Alternatively, you can touch the NFC antenna (if present) with a smartphone or a tablet to wake up the application.
Go and stay in System OFF
- Press and hold Button 2 to immediately switch to System OFF state (if the application is ready) and stay in it.
- Pressing Button 1 will toggle the ready status.
- From this point, the application requires an external reset to restart because the wakeup mechanism is not set up.