# How do you restart the MSP430 Launchpad programmatically with Energia?

Can anybody tell me what Energia method I can call to programatically reset the MSP430 Launchpad. Under certain circumstances, I need it to power down and back up again. It needs to shut down power to its I2C devices when it resets itself.

• Which LaunchPad? And I don't know of any LaunchPad that has I²C devices; have you connected external devices? – CL. May 1 '16 at 7:21
• Yes they are external – Curtis May 1 '16 at 16:01
• Which LaunchPad? And show the schematic of your circuit. – CL. May 1 '16 at 16:59
• MSP-EXP430G2 LaunchPad Assume it is stand alone. I just want to programmatically reset/reboot it. – Curtis May 1 '16 at 20:30

## 1 Answer

You can't do a BOR or POR directly in code for Valueline MSP430G2xxx. You can do a partial reset PUC though.

You can do three things for a reset:

• Full reset by pulling the RST pin low. You have to use a spare GPIO pin, and set it to output low. Produces a full Power-On Reset (POR).

• Password Violation Reset. Write to the Watchdog timer control register without the valid password. i.e. WDTCTL = 0;. Also write to flash without the password, or read/jump to an invalid address. Easiest with the WDTCTL. This is a Power-Up Clear (PUC), not a full reset.

• Enable the Watchdog mode of the Watchdog Timer, and let it time out. This is a WDTTO, also a PUC.

See section 2.1 of the MSP430G2xx family guide for full details.