In this blog post, I will show you how to program an MSP430G2 series chip outside the MSP430 LaunchPad (MSP-EXP430G2) development board using the Launchpad itself as a programmer. This is useful for doing in-system programming without having to swap the target chip in and out of the LaunchPad.
Each MSP430 LaunchPad comes with its own flash emulation hardware as well as the MCU itself, and thus it can be used as a programmer independent of the rest of the MCU circuitry. By default, the programming headers (see picture below) are connected to the on-board MCU via jumpers, but the jumpers can be easily removed so that you can use the flash emulation portion by itself as a programmer.
MSP430G2 devices support the Spy-Bi-Wire interface (see slau320i: Programming Via the JTAG Interface) and the corresponding pins are brought out via the TEST and RST pins:

On 14 pin devices (e.g. MSP430G2231, MSP430G2211), the SBWTDIO (Spy-Bi-Wire test data input/output) pin corresponds to pin 10 (RST) and the SBWTCK (Spy-Bi-Wire test clock) pin corresponds to pin 11 (TEST). On 20 pin devices (e.g. MSP430G2452, MSP430G2553), the SBWTDIO pin is pin 16 and SBWTCK pin is pin 17. The relative locations for these two Spy-Bi-Wire pins are the same across all MSP430G products.

To program an external MSP430G2 device, you need to simply remove all the jumpers from the LaunchPad develpment board and connect the TEST, RST and ground pins with your target device (see picture below). Since the on-board MCU will be disconnected from the flash emulation circuitry there is no need to remove the MCU from the Launchpad when programming an external device. And the external device does not have to be the same type as the one on the LaunchPad either.
In the picture below, the RxD pin is also connected, this was for my testing purpose and is not needed for programming the chip.
According to the reference design, a 47K resistor should be used as the pull-up resistor on the RST pin.

Using this setup, you can program the external chip using TI’s Code Composer Studio the same way as you would with the LaunchPad, except in this case the external chip is being programmed instead of the chip on the LaunchPad.
Thanks a lot Kerry,
Was able to reproduce this setting on my breadboard and make it work.
Looking now to use fritzing(rapid prototyping soft) and making a customized MSP430, homebrewed board.
Hi Kerry,
Would this work in programming ATMEGA328U-PU with arduino bootloader?
Similar connections RX/TX/RST like this: http://arduino.cc/en/Tutorial/ArduinoToBreadboard
Hi Kerry, could this work in programming the atmega328u-pu with arduino bootloader .
I couldn’t get it to work with just rx,tx and rst connected.
Hi Wei,
If memory serves me correctly, MSP430 LaunchPad enumerates as a ttyACM device and Arduino only recognizes ttyUSB or ttyS type devices.
Hello!
MSP430 and Atmel AVR use a totally different programming protocol, hence this will not work, apart from the different device files used.
Is it possible also to debug using this In-System programming or it’s just for programming ?
Alex
I’m building my own little home automation system and I wanted to use the msp430 launchpad to start because of how cheap it is. now i can finally see how I can use the MSP430G2553 on a breadboard if I integrate. for the meantime i found a great MSP430 tutorial that helped me get started.
We are trying to program a msp430F6736 with this launchpad. We could did it succesfully with a MSP-EXP430FR4133 but we can´t do it with MSP-EXP430G2. Should it work? Or it is incompatible?
Dear Marsman,
I have this same trouble trying to program a MSP430F6736IPN (80 pins) via SBW interface from a MSP-EXP430G2 launchpad module with CCS v6. Do you know if this module is indeed incompatible for programming MSP430F6736?
Regards,
Alex
Rio de Janeiro, Brazil
In this Texas Instrument’s schematic (http://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/166/5658.aaSpyBiWiF6xx.JPG) which illustrates the SBW, there are some capacitors to connect, does it work the same without them? Or are they integrated in the launchpad?
In another guide (https://msuraj.wordpress.com/2012/03/29/4-30-msp430-debuggerprogrammer/) I read that you have to modify the debug protocol from JTAG to SBW in the IDE. He was using IAR embedded workbench, do I have to do a similar thing on the Code composer studio IDE ??
Thanks a lot!
Nice,well explained. Well i like the texas instruments MCUs and launchpads.Seems to be much better than arduino.The in circuit programming is a very good feature.
Hi, i made all the connections using MSP430F5529 launch pad to program msp430g2513, the program download to the chip but i need to keep the launch pad connected all the time by spy by wire. It’s any way to avoid this.