Ultra-Low Power with MSP430
delay() vs. sleep()
The loop() blinks the LED twice, enters delay() state for 10 seconds, then blinks once, and goes to sleep() for 10 seconds.
With sleep() and sleepSeconds(), the MCU enters LPM3.
sleep() applies for milliseconds and sleepSeconds() for seconds. |
suspend() and wakeup()
With suspend(), the MCU enters LPM4.
The MCU can only react to a hardware interrupt, triggered here by PUSH2. The interrupt calls the buttonISR() routine and launches wakeup() to return to active mode. This example is based on Frank Milburn's code (June 2015), which is derived from @spirilis at 43oh.com |
Conclusion
Links |
Posted: Dec 29, 2015
Edited: July 26, 2018