1
\$\begingroup\$

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?

\$\endgroup\$
  • 1
    \$\begingroup\$ 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. \$\endgroup\$ – Jasen Jan 18 '15 at 6:28
  • \$\begingroup\$ @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? \$\endgroup\$ – Nilanjan Jan 18 '15 at 6:38
  • \$\begingroup\$ 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 \$\endgroup\$ – Jasen Jan 18 '15 at 7:29
  • \$\begingroup\$ Oh yeah heard about that, the speed isnt the factor now but can i use the SBW protocol in energia via the com port? \$\endgroup\$ – Nilanjan Jan 18 '15 at 7:48
  • \$\begingroup\$ 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. \$\endgroup\$ – Lior Bilia Jan 18 '15 at 10:34
4
\$\begingroup\$

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.upload.protocol=flash-bsl
baremsp430g2553.upload.maximum_size=16384
baremsp430g2553.build.mcu=msp430g2553
baremsp430g2553.build.f_cpu=16000000L
baremsp430g2553.build.core=msp430
baremsp430g2553.build.variant=bare
baremsp430g2553.upload.maximum_ram_size=512

Note: I have not done this myself, but it is how the Arduino system is modified. I'll be putting together a custom msp430fr5969 board in a few days and following the same process.

Of course, you do not need Energia to program the chips. You can make a normal msp430-gcc build system and use the Energia core libraries and compiler. I do this myself using Netbeans and it is well worth the effort to set up. The "Processing" IDE (what Arduino and Energia's IDE are based on) is great for a quick mash up but terrible for any serious work, in my opinion.

\$\endgroup\$
0
\$\begingroup\$

Yes, for any msp430 that had a bootloader with serial upload capability. The standard method of programming would be spy-bi-wire, which does not use the serial pins.

\$\endgroup\$
  • \$\begingroup\$ I wanna use the serial pins, maybe with bsl protocol. And also some schematics would help \$\endgroup\$ – Nilanjan Jan 18 '15 at 7:15
  • \$\begingroup\$ And does the energia IDE support the BSL protocol? \$\endgroup\$ – Nilanjan Jan 18 '15 at 7:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.