Application that demonstrates switching from sleep mode (LPM0) to DEEP_SLEEP0(LPM3.5) The TI Drivers by default aggresively activate the power saving modes whenever possible. This application demonstrates how to constraint certain low power levels and allow certain low power levels. This application assumes the default policy function(policyFxn) specified in the hwattrib in the board file and the default value is PowerMSP432_sleepPolicy. Then on Board_GPIO_BUTTON0 press switches to deep sleep.
It is often best to begin application development with automatic power transitions disabled, and then after basic application debugging is complete, enable the policy with constraints set to permit the lightest sleep state only. Once that is found to be working, progressively release more constraints to allow transitions to deeper sleep states.
Some devices have a hardware attribute enableParking in the board file - when enableParking is set to true, it enables automatic pin parking during LPM3 (PowerMSP432_DEEPSLEEP_0) and LPM4 (PowerMSP432_DEEPSLEEP_1) and input pins are not left floating.
Board_GPIO_LED1 - Indicates that the board was initialized within mainThread(). Turns off on Board_GPIO_BUTTON1 press.Board_GPIO_BUTTON0 - Switches from sleep to deep sleepIf you’re using an IDE (such as CCS or IAR), please refer to Board.html in your project directory for resources used and board-specific jumper settings. Otherwise, you can find Board.html in the directory \
/source/ti/boards/\ .
Run the example. Board_GPIO_LED1 turns ON to indicate driver initialization is complete.
Pressing Board_GPIO_BUTTON0 will turn off Board_GPIO_LED1 and the device will enter deep sleep.
TI-RTOS:
FreeRTOS:
FreeRTOSConfig.h header file for example configuration information.