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.

MSP430F5359: Reading out memory with bootloader (BSL) does not appear to work.

Part Number: MSP430F5359
Other Parts Discussed in Thread: MSP430F5436A, , MSP-FET

I have been working on getting the bootloader (BSL) for our application (using MSP430F5359 and MSP430F5436A processors) and have been able to get write and mass erase commands to work using the bsl-scripter application but the memory read out feature appears to fail silently. 

The following is returned when I run the readout command, but the file MAIN_READOUT.txt is not created. No error messages are returned, and I am able to successfully program application images using the command: BSL-Scripter.exe -d --initComm [COM14,UART,9600] --device MSP430F5xx -b pass.txt -w MAIN.txt which works as expected.

Log mode is turned on!
BSL-Scripter.exe -d --initComm [COM14,UART,9600] --device MSP430F5xx -b pass.txt -r [MAIN_READOUT.txt, 0x8000-0xA3A0]
Verbose is turned on!
Device : MSP430F5xx
Init communication parameters : [COM14,UART,9600]
RX_PASSWORD pass.txt
        Read Txt File  : C:\ti\BSL-Scripter\pass.txt
        [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]
        <80> <02> <00> <3b> <00> <60> <c4>
        [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]
        <80> <02> <00> <3b> <00> <60> <c4> <00> <00> <00> <00> <00> <00> <00>
        BSL Password is correct!

I inspected the packets transmitted with my o-scope and the read command does not appear to actually sent at all. I also tried running the password command followed by the read command as shown below and the read command does not get sent.

BSL-Scripter.exe -d --initComm [COM14,UART,9600] --device MSP430F5xx -b pass.txt

BSL-Scripter.exe -d --initComm [COM14,UART,9600] --device MSP430F5xx -r [NIBP_MAIN_READOUT.txt, 0x8000-0xA3A0]

  • Hi Peter,

    Let me reach out to our tools expert on the BSL-Scripter.

  • Hello Peter,

    I need to debug the CLI on my end to understand the problem. meanwhile, can you try to use the script mode? here' how to do it:

    1. create script.txt with content:

    // init the communication

    MODE 5xx UART COM14

    // unlock BSL

    RX_PASSWORD pass.txt

    // read password with creating the file, address to read, and how many bytes to read

    TX_DATA_BLOCK READ.txt 0x8000 0x23A0

    2. call BSL Scripter with script.txt in the command prompt.

    > BSL-Scripter.exe script.txt

  • Hi Peter,

    on the command line interface, we need to send the password before reading the memory.

    could you please try:

    BSL-Scripter.exe --initComm [COM14,UART,9600] --device MSP430F5xx -b pass.txt -r [NIBP_MAIN_READOUT.txt, 0x8000-0xA3A0]

  • Okay, I created such a script and ran that, but this also does not create the READ.txt file on my machine. Terminal output is shown below:

    C:\ti\BSL-Scripter>BSL-Scripter.exe script.txt
    ---------------------------------------------------------
    BSL Scripter 3.4.0.1

    PC software for BSL programming
    2020-Jul-14 09:08:10
    ---------------------------------------------------------
    Input file script is : C:/ti/BSL-Scripter/script.txt

    MODE 5xx UART COM14
            Baud rate setup for UART is not given / wrong
            It will be setup to the default 9600baud
    RX_PASSWORD pass.txt
            Read Txt File  : C:\ti\BSL-Scripter\pass.txt
            BSL Password is correct!
    TX_DATA_BLOCK READ.txt 0x8000 0x23A0

    C:\ti\BSL-Scripter>

    After running the script there is no file named READ.txt in the C:\ti\BSL-Scripter folder.

  • Running this command also does not create the file NIBP_MAIN_READOUT.txt as expected in the C:\ti\BSL-Scripter directory on my machine.

    C:\ti\BSL-Scripter>BSL-Scripter.exe --initComm [COM14,UART,9600] --device MSP430F5xx -b pass.txt -r [NIBP_MAIN_READOUT.txt, 0x8000-0xA3A0]
    ---------------------------------------------------------
    BSL Scripter 3.4.0.1
    
    PC software for BSL programming
    2020-Jul-14 09:12:16
    ---------------------------------------------------------
    
    Log mode is turned on!
    BSL-Scripter.exe --initComm [COM14,UART,9600] --device MSP430F5xx -b pass.txt -r [NIBP_MAIN_READOUT.txt, 0x8000-0xA3A0] 
    Verbose is turned off!
    Device : MSP430F5xx
    Init communication parameters : [COM14,UART,9600]
    RX_PASSWORD pass.txt
            Read Txt File  : C:\ti\BSL-Scripter\pass.txt
            BSL Password is correct!
    
    C:\ti\BSL-Scripter>

  • Hi Peter,

    thank you for the update.

    I need to test on my end using the same device, but need to get the device at the office tomorrow. could you please provide the information about the device and setup?

    1. so the device is MSP430F5359, which board and communication tools you are using to communicate with the bootloader?
    2. could you please check the BSL Version on the device? so just need to update the script a bit with adding TX_BSL_VERSION command after password command:
      MODE ...
      RX_PASSWORD ...
      TX_BSL_VERSION
    3. I assume you do not customize the BSL and use the TI BSL as it is.

  • Hi Fatmawati,

    1. We are using our own custom board, with both the MSP430F5359 and MSP430F5436A (I have tried both, they act the same way), and programming the device using the MSP-FET tool connected to the bootloader TEST/RST/RX/TX lines.
    2. BSL Version is Vendor:[TI] CI:[07] API:[05] PI:[04]
    3. We have not customized the bootloader, and are using it as-is.

    Thanks,

    Peter

  • Hi Peter,

    I apologize, the script has to have:

    TX_DATA_BLOCK 0x8000 0x23A0 READ.txt

    instead of

    TX_DATA_BLOCK READ.txt 0x8000 0x23A0

  • for the CLI, I tried this and it works:

    BSL-Scripter.exe --initComm [COM13,UART,9600] --device MSP430F5xx -b -r [Read.txt,0x8000-0xA3A0]

    please change the com port according to your setup

  • Hi Peter,

    do the recommendations fix the reading memory problem?

  • Looks like that works. It looks like the difference between the query that I was using and the one you provided was that I had a space after the comma.

    So this works:

    BSL-Scripter.exe --initComm [COM8,UART,9600,PARITY] --device MSP430F5xx -b -r [Read.txt,0x8000-0xA3A0]


    But this does not:

    BSL-Scripter.exe --initComm [COM8,UART,9600,PARITY] --device MSP430F5xx -b -r [Read.txt, 0x8000-0xA3A0]

    Thanks for the help resolving this!

  • thanks for the confirmation, Peter!

**Attention** This is a public forum