This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR5959 BSL Help

Other Parts Discussed in Thread: MSP430FR5959, MSP-FET, TRS3232, MSP430FR6989

I know there are dozen of questions about BSL on the forum but i cant seem to head in the right direction.

I am hoping someone can set me straight. I have a custom board that has a MSP430FR5959. It has a RS232 chip connected to UCA0 UART.I normally load code using MSP-FET using JTag. I would like to reprogram this board over the RS232 port. This board had buttons connected to it.. so i can initiate any start sequence directly from code. I want to use the MSP-FET programmer. I can connect a rs232 chip to the rx/tx pins of the the MSP-FET programmer.  Below is a stripped down copy of my schematic. Can what i want to be done be done with what i have? Im using CCS6.1. I have the bsl-scripter-windows software.  Thank you  

  • Hi Gerald,

    gerald talley said:
    I would like to reprogram this board over the RS232 port

     Why are you not connecting the MSP-FET to the MSP430 directly instead of trying to go throught the TRS3232?

    gerald talley said:
    I can connect a rs232 chip to the rx/tx pins of the the MSP-FET programmer.

    Did you double check that  the logic levels (high and low) of the MSP-FET and TRS TX and RX pins are the same?

    gerald talley said:
    I have the bsl-scripter-windows software

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

    Regards,

    Charles O

  • im going thought rs232 because i need this comm channel when in normal operation.. plus it goes out to a db9 connect so it would be easy to connect to it.. the board is buried inside a case.. i was hoping i could trigger a command from a button press and go into programming mode.. then send the code over the rs232 to the uart0... but right now i dont even see anything coming out the msp-fet uart.. when i run a script i would expect to see something come out the uart to show its trying to send data..
  • Most PC nowadays do not have RS232 Port nor db9 connector. You may be able to add a USB to RS232 converter "cable" which has a USB connector at one end to plug into a PC, and a db9 connector at the other end for RS232 devices. This "cable" may not support all the RS232 signals that are needed for BSL from PC.

    Your Rs232 converter chip on your board supports TXD and RXD only. This is not enough to run BSL from PC.

    After the cascading converts, you will definitly not be able to send the BSL Entry Sequence from PC to the target MSP430.
  • I would be using the msp-fet on the pc.. with a rs232 chip the uart of the msp-fet.. then I will connect it to the db9 of my device.. but I don't even see another trying to come out the uart of the msp-fet
  • "rs232" uses +/- 12V logic levels and usually include 8 signals : TXD, RXD, DTR, DSR, RTS, CTS, CD, and RI. (these 8 plus signal ground = 9 for db9 connector)

    The msp-fet does not use "rs232". It uses 3V/0V logic levels and convert the signals to use USB as two Virtual-Com-Port (VCP) as viewed from the PC.

    As viewed from the MSP, msp-fet can be connected directly to the "4-wire" JTAG pins, the "2-wire" SBW pins, the BSL pins, and/or a UART. All these signals are available at a 14-pin connector.

    The rs232 chip on your proposed target board is unnecessary and may even be undesirable. You should consider the 14-pin connection (or sub-sets of it) to msp-fet.
  • I need the rs232 chip on the target board... during normal operation i just both uarts.. and since the uart0 is connected to the rs232 and goes to the outside world i would hope i could program through that.. i know the msp-fet is uart... i added a rs232 chip to the uart coming from the msp-fet... so it will be msp-fet uart-> rs232chip-------> db9----> rs232(target board) ---> msp uart0.. i current have a jtag connector on the board.. i can program this way fine... but they is less then ideal for field conditions..
  • As I said before, nowadays PC do not have rs232 nor db9 connector. How do you do BSL in the field?

    Even if all your customer's PC has a db0 rs232, will your system's rs232 chip with only TXD and RXD run BSL? Have you tried it?
  • thats what im trying to find out.. can i get the boot loader to run with just the rx and tx lines? i dont expect to connect directly to a pc with the rs232 to program the board.. because i have a rs232 chip connected to the uart0 on the msp i expect to take the uart from the msp-fet and convert it to rs232.. so the board can convert the rs232 back to uart... the rs232 bridge should not be important... It says

    The BSL Z-Area is a small section of memory that can be read and invoked from application code. It is
    located at memory addresses 0x1000 to 0x100F.
    Memory location 0x1000 contains a jump instruction pointing to the BSL start, it can be used to invoke the
    BSL from a running application.

    what im hoping that means is i can start the BSL from the running software.. i can trigger a function that sets everything up i need to diectly from the running code... turn off interrupts.. changes frequencies and baud rates if i have too... i want to invoked the BSL directly from the running programming.. i have never used to bootloader before... i always programmed directly from the jtag..
  • I figured it.. pretty simple

    i run this code from my program

    __disable_interrupt(); // disable interrupts
    ((void (*)()) 0x1000)(); // jump to BSL

    then i connect to it using a normal usb to rs232 cable and i can connect to it with bsl scripter.
    This MSP-FET was not needed..
  • That is great.

    Apparently I was misled to belief that BSL Scripter can only use MSP-FET.
  • I am doing some tests with BSL on a MSP430FR5959, using "bsl-scripter-windows" and I just sent RX_PASSWORD command with wrong password.

    I am receiving 0x9A as answer from MSP and the memory isn't been erased.

    Any clue?

    thanks

  • There may be many different reasons that you receive a 0x9A response.
    1. You intend to send "RX_PASSWORD" command, but you may have sent an unknown command by mistake.
    2. The check sum in the command you sent may be incorrect.
    3. The BSL Signatures on the chip may be such that Flash will not be erased after wrong password is received.
    4. ....
    .... etc.
  • Hi old_cow_yellow, thanks for the answer,

    is 0x9A message error response?

    I'm using "bsl-scripter-windows.exe" I got from http://www.ti.com/tool/mspbsl
    the script used was:
    //
    //Script example FRxx UART BSL
    //
    //Device : MSP430FR6989
    //Comm Bridge: MSP-BSL Rocket
    //
    //Download blink application through
    //UART BSL in FRAM device
    //
    //LOG
    MODE FRxx UART 9600 COM30
    //gives wrong password to do mass erase
    RX_PASSWORD pass32_wrong.txt
    //
    //add delay after giving wrong password
    //because the device does not give
    //any response after wrong password applied
    //

    //DELAY 2000
    //RX_PASSWORD pass32_default.txt
    //RX_DATA_BLOCK blinkLED_FR6989.txt
    //CRC_CHECK 0x4400 0x0020
    //SET_PC 0x4400

    the wrong pass word used in txt was:
    @FFE0
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 00
    q

    the lgo file has this message:
    RX_PASSWORD pass32_wrong.txt
    Read Txt File : D:/ti/BSL/BSL_Scripter_Windows/ScriptExample/FRxx_uart/pass32_wrong.txt
    Error Header incorrect.

    In the osciloscope I saw the right command(0x11), but I didn't calculate ths CRC

    my signatures and interrupt vector has the follow values:
    0xff80: ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff ff ff ff ff ff ff
    ff ff 92 9c ff ff ff ff
    58 9c 24 99 ff ff 42 9c
    ff ff ff ff ff ff a8 9c
    24 9c 1e 9c ff ff 8e 98
    ff ff ff ff ff ff ff ff
    0xfff0: ff ff ff ff ff ff 66 98
  • I think the "script" you used was for FR6989 and the device you have is FR5959.
    You need to edit the script file and change the word "FR6989" to "FR5959".

    Also, the correct password for your chip (if not changed) is:
    0xffe0:
    ff ff ff ff ff ff a8 9c 24 9c 1e 9c ff ff 8e 98
    ff ff ff ff ff ff ff ff ff ff ff ff ff ff 66 98
  • I didn't realize where I have to change it, in the script, all that mention 6969 is comented.
    I'm doing a simple call to 0x1000, is there anything else I have to do to communicate with the processor or after made this call the processor already is in BSL?

    if(!GPIO_getInputPinValue(GPIO_PORT_PJ,GPIO_PIN2))
    {
    __disable_interrupt(); // disable interrupts
    ((void (*)()) 0x1000)(); // jump to BSL
    }

    I want to test wrong password, because I want to protect my binary to be reading from external access, my firmware will change the password everytime the equipment is powered up.

    thanks,
    I'll let you know if it works.
  • You are right, 6969 only appears in the comment.
    But what about the word COM30 in:
    MODE FRxx UART 9600 COM30
    Is that correct for your setup?
  • Before call to 0x1000 you may need to do various re-storing of registers depends on the chip. I do not know what's needed for FR5959. __disable_interrupt(); may not be sufficient (or necessary).
    The safe thing to do is to do a SWBOR first before you call 0x1000.
  • I just change the example and there was a COM1, so I changed to COM30 that is my serial port. In osciloscope I can see the data arriving in MSP.

    I''l see what happen doing a SBWBOR

    Something I did was just send the syncronization byte(0X80) to MSP, but nothing happens, just the MSP send 0x54 after 3 0x80.

    11/08/2016 08:34:59.660 [RX] - 54
    11/08/2016 08:40:26.056 [TX] - 80
    11/08/2016 08:40:26.880 [TX] - 80
    11/08/2016 08:40:27.584 [TX] - 80
    11/08/2016 08:40:27.587 [RX] - 54

  • Hi friend,

    I copy the string of RX_PASSWORD command to MSP and send it to it using a terminal application. 

    I had success using the following configuration of serial port : 9600, even ,8,1

    Apparently, the example application was configurated in the worng way.

    Finally, my test worked, calling the BSL from anywhere of my firmware.

    Thanks for your help.

    Aroldo

**Attention** This is a public forum