Programming MSP430G2553 with Raspberry Pi 2

Started by kynix, January 24, 2017, 08:34:05 AM

Previous topic - Next topic

kynix

So, i want to program a msp430g2553 microcontroller(see datasheet http://www.kynix.com/uploadfiles/pdf65976/MSP430G2553IN20.pdf) with raspberry pi 2. Since i don't want to use any IDE i would like to do it with clean C and terminal, without any external libraries like wiringPi etc. , just the microcontrollers one.

My questions are:

Can i do this with common interfaces like I2C or SPI?
Or should i use the JTAG interface to do this?
This is the first microcontroller that i am trying to program.I've seen that you can program an ATtiny85 with raspberry over SPI. Does all the microcontrollers have this functionalities or it is device specific.

LubOlimex

Hey,

You can program the chip without programer. Refer to "Bootstrap Loader (BSL)" part of the datasheet (page 13). The datasheet is located here: http://www.ti.com/lit/ds/symlink/msp430g2553.pdf - information about BSL can be found here: http://www.ti.com/lit/ug/slau319l/slau319l.pdf

>>> Can i do this with common interfaces like I2C or SPI?

Yes, UART to be exact. It would a good idea to use the software provided by Texas Instruments for the purpose (don't know if it'd run in the RPi): http://www.ti.com/tool/mspbsl

>>> Or should i use the JTAG interface to do this?

JTAG usually saves development time and allows debugging but in specific cases using bootloader might be a better idea. For example, if you need to change couple of parameters rarely in a large quantity of products in an environment that doesn't allow connecting a JTAG or direct access - it might be cheaper solution to use the bootloader instead of a tool.

>>> This is the first microcontroller that i am trying to program. I've seen that you can program an ATtiny85 with raspberry over SPI. Does all the microcontrollers have this functionalities or it is device specific.

This is very vague example. ATtiny85 is an Atmel chip from the AVR family. MSP430G2553 is a Texas Instruments chip from the MSP430 family. ATtiny85 has only 8 pins, while MSP430G2553 has at least 20 (depending on the package). It wouldn't be a good idea to compare them. By default ATtiny85 targets doesn't have a bootloader at all - the units that allow programming without an ISP programmer (yes, ATtiny85 can be programmed via ISP programmer, and it has no JTAG interface - only debugWIRE) had been first programmed with the bootloader.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex