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.

MSP430FR5739 BSL_Scripter using Launchpad

Other Parts Discussed in Thread: MSP430FR5739, MSP430G2553, MSP430G2231

Hello,

I have been trying to program the MSP430FR5739 (MSP-EXP430FR5739 Experimenter Board) using the Launchpad BSL interface but I have not succeeded so far. I am following the guide LaunchPad-Based MSP430 UART BSL Interface slaa535a.pdf. I have also read the slau319f guide.

I didn’t have the MSP430G2231, so on the Launchpad (version 1.4) I used the MSP430G2553 with the software that was given in this post: http://e2e.ti.com/support/microcontrollers/msp430/f/166/p/209340/741073.aspx#741073 I compiled and downloaded the software to the MSP430G2553 using CCS v5.3.0.

My connections are as follows:
- On the Launchpad (v1.4) all the jumpers are connected horizontally (ie. connecting the EMULATION part  to the MSP-EXP430G2 part).
- On the MSP-EXP430FR5739 Experimenter Board all the jumpers that connect the emulation part and the FR57XX part have been removed.
- The rest of the connections are as described on Table 2, page 7 of slaa535a.pdf :
J6.1 (VCC)    – J6.1 (VCC)               
J6.3 (GND)    – J6.3 (GND)
J2.14 (P1.6)  – SV2.11 (P2.0)
J2.15 (P1.7)  – SV2.8 (P2.1)
J1.6 (P1.4)    – J3.7 (/RST)
J1.7 (P1.5)    – J3.9 (TEST)

When I connect the Launchpad to my computer both red and green LED turn on, which -according to step 4 of the “2.2 Using the Launchpad MSP430 BSL Interface” procedure described on pages 4-5 of slaa535a.pdf, -indicate that the BSL is successfully invoked: “If the target BSL is successfully invoked, both red and green LEDs on the Launchpad should turn on.


On the PC side I am using the BSL_Scripter.exe (v. 1.07) from slau319f (MSP430 Programming Via the Bootstrap Loader (BSL) (Rev. F))

The MSP430 Application UART settings (COM6) are:
Bits per second: 9600, Data bits: 8, Parity: None, Stop bits: 1, Flow control: none


The script I’m using is:

MODE 5xx COM6
VERBOSE
MASS ERASE
RX_PASSWORD
RX_DATA_BLOCK fr5739_led_p3_4.txt
 

And the output of the BSL_Scripter is:

C:\BSL_TEST\Exe>BSL_Scripter.exe script.txt
------------------------------------------
BSL Scripting application 1.07
The local time is: 17:28 on 08.10.2013
------------------------------------------
Initializing, Mode: 5xx COM: COM6   DONE
Verbose mode on
Hit Uknown Command
RX Password:                       
-------------------------------------------------
[80] [21] [00] [11] [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] [9e] [e6] {51}
-------------------------------------------------
FAIL(51)
Writing fr5739_led_p3_4.txt to device:   
-------------------------------------------------
[80] [bc] [00] [10] [00] [c2] [00] [1a] [14] [3f] [40] [00] [00] [3f] [90] [01] [00] [22] [28] [3f] [40] [00] [00] [3f] [90] [01] [00] [1d] [28] [3a] [40] [00] [00] [3a] [80] [00] [00] [3a] [50] [07] [00] [5a] [09] [39] [40] [00] [00] [3c] [49] [3d] [49] [cf] [0d] [0f] [18] [4f] [5f] [00] [18] [4f] [dc] [6f] [4f] [4f] [4f] [5f] [06] [00] [18] [5b] [4f] [00] [00] [1c] [53] [0d] [63] [3e] [49] [3f] [49] [4b] [13] [1a] [83] [ec] [23] [3f] [40] [00] [00] [3f] [90] [00] [00] [08] [24] [3a] [40] [00] [00] [02] [3c] [6a] [13] [2a] [52] [3a] [90] [00] [00] [fb] [23] [19] [16] [10] [01] [21] [83] [b2] [40] [80] [5a] [5c] [01] [f2] [d0] [10] [00] [24] [02] [f2] [e0] [10] [00] [22] [02] [b1] [40] [20] [4e] [00] [00] [91] [83] [00] [00] [81] [93] [00] [00] [f5] [27] [fa] [3f] [03] [43] [31] [40] [00] [20] [b0] [13] [b0] [c2] [0c] [93] [02] [24] [b0] [13] [00] [c2] [0c] [43] [b0] [13] [6e] [c2] [b0] [13] [b4] [c2] [1c] [43] [10] [01] [03] [43] [ff] [3f] [d9] [4b] {ee}
-------------------------------------------------
FAIL writing data block starting at c200

I am also attaching the fr5739_led_p3_4.txt file that I am trying to upload to the FR5739 (which is a simple program that blinks the led connected on P3.4) using the BSL_scripter.


I am new to this procedure and I have many questions.

- What does the “Hit Uknown Command" indicate?

- How can I find the RX Password and provide it to the BSL_Scripter? (I have the previous code that was loaded on the FR5739 –for which I had also generated a TI-TXT file- but I don’t know how to obtain the password). Also is it mandatory to provide the RX password to the BSL_Scripter?

- I read about the UART messages of BSL_Scripter on slau319f.pdf and the 51 indicates: 0x51 Header incorrect. The packet did not begin with the required 0x80 value. (however according to BSL_Scripter output it does begin with 80).  Also, a couple of times that I retried the same procedure with the aforementioned script and TI-TXT file, I received the 54 message:  0x54 Packet size exceeds buffer. The packet size given is too big for the RX buffer. What do these messages mean exactly?


Please help me to solve these problems.
Thank you in advance!


Theodora

  • Hi Theodora,

    Thanks for providing so much information!

    You are getting the Unknown command message because your script says "MASS ERASE" instead of "MASS_ERASE". Make sure there is an underscore, not a space, and then try again.

    I think there is a sample script for the FR5739 included in the zip file download for the Launchpad BSL interface app note: www.ti.com/lit/zip/slaa535 that you could try.

    For your question about the password, if you mass erase the part first, then the password should be all 0xff as you provided. You only need to know the password from the previous code if you are trying to be able to read back the previous code, rather than just erasing and reprogramming the device.

    For your other errors, I'd try the script with the corrected MASS_ERASE command first and see if the issues persist, then post back - I'm not 100% sure what the scripter does when it encounters an unknown command and if this could throw it off.

    Regards,

    Katie

     

     

  • Hello Katie and thank very much for your reply!

    You made it very clear why and when the RX password is needed!

    I also corrected the script as you said, which corrected the "Hit Unknown Command" message!

    So now my script is:

    MODE 5xx COM6
    VERBOSE
    MASS_ERASE
    RX_PASSWORD
    RX_DATA_BLOCK fr5739_led_p3_4.txt


    I tried the BSL_Scripter.exe that was provided in the slau319f.zip again, with the corrected script and it still fails. Now, the output of the BSL_Scripter is:

    C:\BSL_TEST\Exe>BSL_Scripter.exe script.txt

    ------------------------------------------
    BSL Scripting application 1.07
    The local time is: 21:43 on 08.10.2013
    ------------------------------------------
    Initializing, Mode: 5xx COM: COM6       DONE
    Verbose mode on
    Mass Erase:
    -------------------------------------------------
    [80] [01] [00] [15] [64] [a3] {54}
    -------------------------------------------------
    FAIL(54)
    RX Password:
    -------------------------------------------------
    [80] [21] [00] [11] [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] [9e] [e6] {51}
    -------------------------------------------------
    FAIL(51)
    Writing fr5739_led_p3_4.txt to device:
    -------------------------------------------------
    [80] [bc] [00] [10] [00] [c2] [00] [1a] [14] [3f] [40] [00] [00] [3f] [90] [01]
    [00] [22] [28] [3f] [40] [00] [00] [3f] [90] [01] [00] [1d] [28] [3a] [40] [00]
    [00] [3a] [80] [00] [00] [3a] [50] [07] [00] [5a] [09] [39] [40] [00] [00] [3c]
    [49] [3d] [49] [cf] [0d] [0f] [18] [4f] [5f] [00] [18] [4f] [dc] [6f] [4f] [4f]
    [4f] [5f] [06] [00] [18] [5b] [4f] [00] [00] [1c] [53] [0d] [63] [3e] [49] [3f]
    [49] [4b] [13] [1a] [83] [ec] [23] [3f] [40] [00] [00] [3f] [90] [00] [00] [08]
    [24] [3a] [40] [00] [00] [02] [3c] [6a] [13] [2a] [52] [3a] [90] [00] [00] [fb]
    [23] [19] [16] [10] [01] [21] [83] [b2] [40] [80] [5a] [5c] [01] [f2] [d0] [10]
    [00] [24] [02] [f2] [e0] [10] [00] [22] [02] [b1] [40] [20] [4e] [00] [00] [91]
    [83] [00] [00] [81] [93] [00] [00] [f5] [27] [fa] [3f] [03] [43] [31] [40] [00]
    [20] [b0] [13] [b0] [c2] [0c] [93] [02] [24] [b0] [13] [00] [c2] [0c] [43] [b0]
    [13] [6e] [c2] [b0] [13] [b4] [c2] [1c] [43] [10] [01] [03] [43] [ff] [3f] [d9]
    [4b] {ee}
    -------------------------------------------------
    FAIL writing data block starting at c200


    I'm now getting 2 errors (54 for MASS_ERASE and 51 for RX_PASSWORD).
    In a few occasions, instead of 54 for MASS_ERASE I got the ee error (timeout?).


    I also tried to use the script from the slaa535a.zip as you suggested, but in this case I got other errors:


    When I use the BSLDEMO2.exe that is included in slaa535a.zip I get the following message:


    C:\slaa535a\LPAD_BSL_INTERFACE\TestScripts\MSP430FR5739>..\Exe\BSLDEMO2.exe script.txt
    MSP430 Bootstrap Loader Communication Program (Version 2.00)
    Mass Erase...
    ERROR: Synchronization failed!
    Device with boot loader connected?

    C:\slaa535a\LPAD_BSL_INTERFACE\TestScripts\MSP430FR5739>pause
    Press any key to continue . . .



    When I use the BSL_Scripter.exe of the slaa535a.zip with the MSP430FR5739 TestScript, I get the "missing MSVCR100.dll file" error. I read about how to correct this error in this post
    and I installed all the Microsoft Visual C++ xxxx Redistributable Packages for both x86 and x64 that weren't installed in my laptop as described here:
    but I still get the same error. Apart from installing the packages that were missing and after seeing that the BSL_Scripter.exe of the slaa535a.zip wasn't working, I tried to reinstall all the Redistributable Packages (I uninstalled them, restarted my laptop, cleaned the redundant files and successfully installed the redistributable packages) but I still get the same error.
    (My Windows version is: Windows 7 Enterprise 64 bit with Service Pack 1)

    In both cases I used the TestScript that was included in slaa535a.zip in which I only changed the COM port as needed:

    MODE 5xx COM6
    VERBOSE
    MASS_ERASE
    RX_PASSWORD
    RX_DATA_BLOCK BLINK_MSP430FR5739.txt
    RX_DATA_BLOCK BOR.txt



    Any idea on how to proceed?

    Thank you very much again!


    Regards,
    Theodora

  • Hello again,

    I wanted to update you on this topic.

    I changed the MSP430G2553 of my launchpad to an MSP430G2231 that I borrowed earlier -which I programmed with the Firmware provided in the SLAA535a.zip-. I used the same script (after correcting the MASS_ERASE command as suggested by Katie) and the same TI-TXT file. I also used the BSL_Scripter v1.07 of slau319f.zip and it worked.

    I can't tell what exactly was wrong with the MSP430G2553 firmware, but fortunately I solved my problem after changing the G2553 to a G2231 as I explained.

    Best regards,
    Theodora

**Attention** This is a public forum