# How to programm a standalone MSP430g2553 via a com port?

The MSP430 is a dirt cheap MCU and i thought that if i could make a barebone launchpad out of that which can be programed directly via the PC COM port or a virtual one. So is it possible to program it with the energia IDE on the com port?

• TI sent me a genuine lanchpad for \$4.30 (free international shipping) I think the launchapd das an ARM M0 on it that converts the serial to SPI for programmng. – Jasen Jan 18 '15 at 6:28
• @Jasen- why would serial be converted to SPI? Moreover even if it is so then how would i do that from a com port i.e. what protocol would be implemented? – Nilanjan Jan 18 '15 at 6:38
• it's not actually SPI, but something called spy-bi-wire that uses a clock line and a birectional data line, the serial port has enough I/O to drive that, but serial over usb has a max bit-bang rate of about 1000 transitions per second which if it's acceptable to the MSP430 would be painfully slow – Jasen Jan 18 '15 at 7:29
• Oh yeah heard about that, the speed isnt the factor now but can i use the SBW protocol in energia via the com port? – Nilanjan Jan 18 '15 at 7:48
• The MCU on the MSP launchpad is MSP430F1612 (might be another variant on newer models) essentially, the UIF430 JTAG adapter. Spy-Bi-Wire is done via dedicated SBWTDIO (Test) and SBWCLK (Reset) lines. To use a UART, you need to use the BSL pins. – Lior Bilia Jan 18 '15 at 10:34

The details of the MSP430 series boot strap loader (BSL) can be found here:

http://www.ti.com/lit/ug/slau319i/slau319i.pdf

You will need to connect RST and TEST lines to DTR and RTS as described.

Energia uses mspdebug to program the Launchpads using the rf2500 or tilib options. The flash-bsl option should be about the program the MSP430g2553 via the COM port with the RST and TEST lines connected.

In the Energia folder under hardware then msp430 there is a file called boards.txt. You should add a new entry for your board with the upload setting set to flash-bsl.

e.g.

##############################################################
baremsp430g2553.name=msp430g2553 (16MHz)
baremsp430g2553.build.mcu=msp430g2553
baremsp430g2553.build.f_cpu=16000000L
baremsp430g2553.build.core=msp430
baremsp430g2553.build.variant=bare