Button Interrupt + Low-Power Mode

Configures P1.1 as input with pull-up and falling-edge interrupt, then puts the CPU to sleep in LPM4 with GIE set. Each button press is a falling edge: the ISR wakes the CPU, toggles the LED on P1.0, clears P1IFG and returns to sleep.

What to watch as you step

Open this example