Olimex Support Forum

Microcontrollers => MSP430 => Topic started by: matthiasl on May 11, 2015, 04:32:44 PM

Title: Flashing MSP430AFE252 with Olimex BSL Rocket via UART
Post by: matthiasl on May 11, 2015, 04:32:44 PM
Hello all,

I spend at least 8 hours trying to figure out how to programm my MSP430AFE252 with the Olimex BSL Rocket via UART - and failed basically.
I didn't get any help in the TI Forum so far and I need to programm the chip urgently.

Yes, there are lots of FAQs and aplication notes but many just seem to be written from a TI professor who spent his whole life with the MSP430 - I didn't find any basic clues on which pins to connect, which program to use for flashing, what to do with the buttons on the BSL rocket, oftentimes the MSP430AFE was missing in all of the lists, and so on. In my opinion there is a need for a Basic Tutorial for beginners of MSP430. Hands on from unboxing the MSP to flashing the first hello world program. I did lots of stuff with AVRs, some projects with ARM and some FPGA stuff. Nevertheless it seems very confusing to work with the MSP430. Maybe I just couldn't find that turoial...

1.) Does the MSP430AFE252 ( https://e2e.ti.com/support/microcontrollers/msp430/f/166/p/addpost/MSP430AFE252 (https://e2e.ti.com/support/microcontrollers/msp430/f/166/p/addpost/MSP430AFE252) )even support BSL via UART? Unlike suggested in the Family Datasheet, there was only very little information about flashing the MSP with BSL in the datasheet of the MSP430AFE2xx ( https://e2e.ti.com/support/microcontrollers/msp430/f/166/p/addpost/MSP430AFE2xx (https://e2e.ti.com/support/microcontrollers/msp430/f/166/p/addpost/MSP430AFE2xx))

2.) Which are the dedicated pins on the MSP for flashing with BSL? slau319i (https://e2e.ti.com/support/microcontrollers/msp430/f/166/p/addpost/slau319i (https://e2e.ti.com/support/microcontrollers/msp430/f/166/p/addpost/slau319i)) doesn't even list the MSP430AFE252 on page 34 (4.1.3). There is a seperate TEST pin on my MSP (pin 10) and I also tried using the TCK (pin 22 /P1.6).


As far as I understood, the connection is like this:

BSL Pin || BSL Pin Name || MSP430AFE252
1       || TXD*         || P1.4/URXD0 (also tried P1.0 and P1.1)
2       || TCK          || n.c. (also tried P1.6/TCK)
3       || RXD          || P1.3/UTXD0 (also tried P1.1 and P1.0)
4       || RST          || RST (pin 11) with 47K||2.2nF pull-up to 3.3V
5       || GND          || GND
6       || VCC          || DVCC/AVCC
7       || TST          || TEST (Pin 10) (also tried n.c.)
8       || VCC_IN       || DVCC/AVCC (also tried n.c.)
9       || UCLK         || n.c.
10      || USTE         || n.c.


*this is confusing because the BSL actually seems to write on its RXD pin. Damn you UART!

3) Which pin do I have to connect 1-TXD to? (AND Which one 3-RXD)

I used CodeComposer 6.1.0.00104 to code a basic LED toggle program. (Btw, it's kind of funny that in year 2015 project names that include a space still result in an error during hex generation... Different story)

4.) After googling white a while, I figured that I have to use the BSL Scripter (is that right? also tried MSP430Flasher and MSPFET)

I wrote a simple script:

MODE 543x_family UART COM29
MASS_ERASE
RX_PASSWORD
RX_DATA_BLOCK Hello


(COM29 in my windows 7 64bit device manager is "MSP BSL USB Tool")

5.) Is 543x_family the right setting? Again, MSP430AFE252 is missing in the list in BSL Scripter User's Guide ( https://e2e.ti.com/support/microcontrollers/msp430/f/166/p/addpost/BSL%20Scripter%20User%27s%20Guide (https://e2e.ti.com/support/microcontrollers/msp430/f/166/p/addpost/BSL%20Scripter%20User%27s%20Guide) )

this results in:

------------------------------------------
BSL Scripting application 2.01
The local time is: 21:12 on 07.05.2015
------------------------------------------
Initializing, Mode: 5438  UART 9600  COM29      DONE
Mass Erase:                                     FAIL(0xEE)
RX Password:                                    FAIL(0xEE)
RX DATA BLOCK:
    Writing Hello to device:
    FAIL(0xEE)


6.) Do I have to press the "USB_BSL" button on my Olimex BSL rocket? Sometimes it makes a difference and the RXD (or maybe in reality TXD?) line is low instead of high.

During UART initialization, my oscilloscope prints the following:


Shortly after, I guess during the erase command:


What do I do wrong? Please help me, I'm pretty confused what to do...

Can I use SPI as well?

Is there a (cheap) alternative to flash an MSP430?