Readme

This example has not been fully validated at the time of this release. Functionality is not guaranteed.

Example Summary

Configures different power policies based on the configuration of two input pins. This prevents the device from indefinitely staying in SHUTDOWN mode since the serial wire debug (SWD) remains 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 pins. 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
GPIOB PB22 Standard Output
GPIOB PB26 Standard Output
GPIOB PB17 Standard Input with internal pull-down
GPIOB PB12 Standard Input with internal pull-down
SYSCTL
EVENT
DEBUGSS PA20 Debug Clock
DEBUGSS PA19 Debug Data In Out

BoosterPacks, Board Resources & Jumper Settings

Visit LP_MSPM0G3507 for LaunchPad information, including user guide and hardware files.

Pin Peripheral Function LaunchPad Pin LaunchPad Settings
PA18 GPIOA PA18 J3_26/J3_29
  • PA18 can be connected to S1 button to VCC with external pull-down
    • J8 ON Connect S1 button and external pull-down
    • J8 OFF Disconnect S1 button and external pull-down

  • PA18 can be connected to XDS-110 BSL_Invoke
    • J101 17:18 OFF Disconnect pin to XDS-110 BSL Invoke

  • PA18 can be connected to boosterpack pin J3_29
    • J15 2:3 Connect pin to J3_29
    • J15 1:2/OFF Disconnect pin from J3_29

  • PA18 can be connected to boosterpack pin J3_26
    • R58 is soldered and connects pin to J3_26 by default
PB22 GPIOB PB22 J27_5
  • PB22 can be connected to LED2 Blue
    • J5 ON Connect to LED2 Blue
    • J15 OFF Disconnect from LED2 Blue
PB26 GPIOB PB26 J27_8
  • PB26 can be connected to LED2 Red
    • J6 ON Connect to LED2 Red
    • J6 OFF Disconnect from LED2 Red
PB17 GPIOB PB17 J2_18 N/A
PB12 GPIOB PB12 J2_19 N/A
PA20 DEBUGSS SWCLK N/A
  • PA20 is used by SWD during debugging
    • J101 15:16 ON Connect to XDS-110 SWCLK while debugging
    • J101 15:16 OFF Disconnect from XDS-110 SWCLK if using pin in application
PA19 DEBUGSS SWDIO N/A
  • PA19 is used by SWD during debugging
    • J101 13:14 ON Connect to XDS-110 SWDIO while debugging
    • J101 13:14 OFF Disconnect from XDS-110 SWDIO if using pin in application

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 BoardConfigure Unused Pins.

For more information about jumper configuration to achieve low-power using the MSPM0 LaunchPad, please visit the LP-MSPM0G3507 User’s Guide.

Example Usage

Compile, load and run the example. Rising edge on S1 will wake device from SHUTDOWN state and LED2 blinks equal to the number of times the device has been woken up.