Readme
Example Summary
Configures different power policies based on the configuration of two input pins. Which allows user to prevent the device to indefinitely stay in SHUTDOWN mode since the serial wire debug (SWD) remain locked while the device is in SHUTDOWN mode.
After entering SHUTDOWN mode, the device will exit when a high level is detected on the wake-up pin. Then it will toggle LED2 for as many times as it has exited SHUTDOWN mode before (i.e. LED2 will toggle once the first time it wakes up, two times the second time it wakes-up and so on).
If a different power policy is selected via the configuration input pnis. The device will only remain in the selected power policy but will not wake-up via wake-up pin
The table below shows the power policy to be configured based on configuration input configuration.
| config input 0 | config input 1 | Power Policy |
|---|---|---|
| High (default) | High (default) | SHUTDOWN |
| High (default) | Low (pin grounded) | STOP0 |
| Low (pin grounded) | High (default) | STANDBY0 |
| Low (pin grounded) | Low (pin grounded) | RUN0SLEEP0 |
Peripherals & Pin Assignments
| Peripheral | Pin | Function |
|---|---|---|
| GPIOA | PA18 | Standard with Wake Input |
| GPIOA | PA23 | Standard Output |
| GPIOA | PA0 | Open-Drain Output |
| GPIOA | PA14 | Standard Input with internal pull-up |
| GPIOA | PA28 | High-Drive Input with internal pull-up |
| SYSCTL | ||
| EVENT | ||
| DEBUGSS | PA20 | Debug Clock |
| DEBUGSS | PA19 | Debug Data In Out |
BoosterPacks, Board Resources & Jumper Settings
Visit LP_MSPM0L2228 for LaunchPad information, including user guide and hardware files.
| Pin | Peripheral | Function | LaunchPad Pin | LaunchPad Settings |
|---|---|---|---|---|
| PA18 | GPIOA | PA18 | J3_23 |
|
| PA23 | GPIOA | PA23 | N/A |
|
| PA0 | GPIOA | PA0 | J3_10 |
|
| PA14 | GPIOA | PA14 | J3_26 |
|
| PA28 | GPIOA | PA28 | J7_34 | N/A |
| PA20 | DEBUGSS | SWCLK | N/A |
|
| PA19 | DEBUGSS | SWDIO | N/A |
|
Device Migration Recommendations
This project was developed for a superset device included in the LP_MSPM0L2228 LaunchPad. Please visit the CCS User’s Guide for information about migrating to other MSPM0 devices.
Low-Power Recommendations
TI recommends to terminate unused pins by setting the corresponding functions to GPIO and configure the pins to output low or input with internal pullup/pulldown resistor.
SysConfig allows developers to easily configure unused pins by selecting Board→Configure Unused Pins.
For more information about jumper configuration to achieve low-power using the MSPM0 LaunchPad, please visit the LP-MSPM0L2228 web page.
Example Usage
Compile, load and run the example. Rising edge in S2 will wake device from SHUTDOWN state and LED2 blinks equal to the number of times the device has been woken up.