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.

MSP430FR2433: Trouble programming memory through BSL using Uniflash

Part Number: MSP430FR2433
Other Parts Discussed in Thread: MSP-EXP430FR2433, UNIFLASH, MSP-FET, MSP-EXP430FR5969

We are trying to program the MSP430FR2433 with Uniflash using UART BSL mode and we need help. We are using Uniflash v5.0.0.2289. We are also using the MSP-EXP430FR2433 board and very closely following the example described in Section 5 of "Programming the Bootloader of MSP430™ and SimpleLink™ MSP432™ , CC13xx, CC26xx, and CC32xx MCUs Using UniFlash" . We have created a simple LED blink program and converted its output to TI-Text hex format.

The contents of our image file is as follows:

@c400
B2 40 80 5A CC 01 D2 D3 04 02 D2 D3 02 02 92 C3
30 01 B2 D0 10 00 82 03 B2 40 50 C3 92 03 B2 D0
20 02 80 03 03 43 32 D2 03 43 03 43 FE 3F 03 43
31 40 00 30 B0 13 5E C4 0C 43 B0 13 00 C4 1C 43
B0 13 58 C4 D2 E3 02 02 B2 80 B0 3C 92 03 00 13
32 D0 10 00 FD 3F 03 43 03 43 FF 3F 03 43 1C 43
10 01
@ff80
FF FF FF FF FF FF FF FF
@ffda
50 C4 50 C4 50 C4 50 C4 50 C4 50 C4 50 C4 50 C4
50 C4 50 C4 50 C4 50 C4 50 C4 50 C4 50 C4 44 C4
50 C4 50 C4 30 C4
q

The contents of our password file when we start with an erases device is:

@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 ff ff
q

The contents of our password file when we start with a pre-programmed device is:

@ffe0
50 C4 50 C4 50 C4 50 C4 50 C4 50 C4 50 C4 50 C4
50 C4 50 C4 50 C4 50 C4 44 C4 50 C4 50 C4 30 C4
q

Uniflash gives the following error: 

Image loading failed: Flash Generic, Loading Images... Error: -9

We always get the same error whether we start with the device memory pre-erased and a password file with all ff values, or if we start with the device pre-programmed and the corresponding password file.

Questions:

  1. Is Uniflash v5.0.0.2289 able to program the MSP430FR2433 via BSL using the MSP-EXP430FR2433 board?
  2. What is the meaning of the Uniflash error code listed above?
  3. Please provide suggestions about what we might be doing wrong.

Thanks

  • Hello,

    I suspect you're seeing this issue because the MSP-EXP430FR2433 on-board debugger doesn't support BSL programming. According to the BSL Overview Table 1 in the MSP430 FRAM Devices Bootloader (BSL) User's Guide, the MSP-FET or MSP-BSL (Rocket) should be used. In Figure 6 in the Program Bootloader of MSP430, MSP432, CC13xx, CC26xx, CC32xx MCUs Using UniFlash user's guide, you can see these two options in UniFlash.

    Hope this helps.

    Regards,

    James

  • Thanks for the reply. We disconnected the jumpers from J101 of the MSP-EXP430FR2433 board and wired in the corresponding signals from an MSP-FET. We still haven't been able to make this work, but now UniFlash gives the following error.

    Image loading failed: Flash Generic, Loading Images... Error: -1

    By the way, this brings up a different question. Which MSP-FET COM port number (MSP Debug Interface, or MSP Application UART1) should be use in the settings tab of UniFlash. See screenshots below.

  • Hi,

    You'll want to select the Application UART COM port, not the Debug Interface COM port. The BSL entry sequence is done using the Debug Interface COM, but the BSL communication happens over the UART COM port.

    Using UniFlash, MSP-EXP430FR5969 LaunchPad and MSP-FET, I was able to get the BSL programming to work. The MSP-FET works on this LaunchPad using the on-board JTAG connector because the BSL TX and RX pins are connected to the JTAG connector. I did have to click "Load Images" button twice, but it did work as you can see in the log below.

    Hope this helps!

    Regards,

    James

  • We've made good progress on this. I'll list what I did below incase it helps others.

    Connect MSP-FET to target as follows:

    • MSP-FET Pin 2(VCC_TOOL) to Target Pin 24 (DVCC 3.3V)
    • MSP-FET Pin 9 (GND) to Target Pin 18/23 (DVSS)
    • MSP-FET Pin 11 (RST) to Target Pin 1 (RST/SBWTDIO)
    • MSP-FET Pin 8 (TEST/VPP) to Target Pin 2 (TEST/SBWTCK)
    • MSP-FET Pin 12 (UART_TXD) to Target Pin 4 (P1.5/UCA0RXD)
    • MSP-FET Pin 14 (UART_RXD) to Target Pin 3 (P1.4/UCA0TXD)

    Setup UniFlash as follows:

    • Connection = MSP430FR2433(BOOTLOADER)
    • COM Port = 71 ("MSP Application UART1" from Windows dev manager)
    • Communication Bridge = MSP-FET

    Unfortunately there's still something wrong but I believe it may have to do with my hex conversion. I used this command line for the conversion:
    hex430.exe --byte --memwidth=8 --romwidth=8 --ti_txt -o blink_bsl_test.txt blink.out

    This is the output I get from UniFlash when I try to program an erased device:

    [9/9/2019, 2:18:35 PM] [INFO] MSP430: MSP430FR2433(Bootloader)
    [9/9/2019, 2:18:57 PM] [INFO] MSP430: MSP430FR2433(Bootloader)
    [9/9/2019, 2:19:00 PM] [INFO] MSP430: BSL Password is correct!
    [9/9/2019, 2:19:00 PM] [INFO] MSP430: Vendor:[TI] CI:[08] API:[35] PI:[B3]
    [9/9/2019, 2:19:00 PM] [INFO] MSP430: Programming memory time elapsed: 0.262s
    [9/9/2019, 2:19:00 PM] [INFO] MSP430: Number of bytes programmed: 144 bytes
    [9/9/2019, 2:19:00 PM] [INFO] MSP430: Programming speed: 0.5367kByte/s
    [9/9/2019, 2:19:00 PM] [ERROR] MSP430: CRC check at 0xffe0 does not match; expected value: 0x75f8 obtained from BSL: 0xa9a9
    [9/9/2019, 2:19:00 PM] [INFO] MSP430: Verifying memory at : 0xc400 is match with the expected CRC value: 0xf3b
    [9/9/2019, 2:19:00 PM] [INFO] MSP430: Verifying memory at : 0xff80 is match with the expected CRC value: 0x97df
    [9/9/2019, 2:19:00 PM] [INFO] MSP430: Verifying memory at : 0xffda is match with the expected CRC value: 0x769a
    [9/9/2019, 2:19:00 PM] [INFO] MSP430: Verifying memory time elapsed: 0.134s


  • Got it. We have something working finally!

    When we use the correct password file and two consecutive attempts with Uniflash, the programming is always successful. The first attempt fails with "[ERROR] MSP430: [ERROR]BSL password is incorrect!" then the second attempt works correctly. This is repeatable.

    To generate the password file we used CCS memory window to write out the 16 words starting at address 0xffe0, then we converted this to TI-HEX format using the following command line: hex430.exe --byte --memwidth=8 --romwidth=8 --ti_txt -o password.txt password.out

    This produces our password.txt:

    @ffe0
    50 C4 50 C4 50 C4 50 C4 50 C4 50 C4 50 C4 50 C4
    50 C4 50 C4 50 C4 50 C4 44 C4 50 C4 50 C4 30 C4
    q

    Successful output from Uniflash:

    [9/9/2019, 3:03:57 PM] [INFO] MSP430: MSP430FR2433(Bootloader)
    [9/9/2019, 3:04:00 PM] [INFO] MSP430: BSL Password is correct!
    [9/9/2019, 3:04:00 PM] [INFO] MSP430: Vendor:[TI] CI:[08] API:[35] PI:[B3]
    [9/9/2019, 3:04:00 PM] [INFO] MSP430: Programming memory time elapsed: 0.329s
    [9/9/2019, 3:04:00 PM] [INFO] MSP430: Number of bytes programmed: 176 bytes
    [9/9/2019, 3:04:00 PM] [INFO] MSP430: Programming speed: 0.5224kByte/s
    [9/9/2019, 3:04:00 PM] [INFO] MSP430: Verifying memory at : 0xc400 is match with the expected CRC value: 0xf3b
    [9/9/2019, 3:04:00 PM] [INFO] MSP430: Verifying memory at : 0xff80 is match with the expected CRC value: 0x97df
    [9/9/2019, 3:04:00 PM] [INFO] MSP430: Verifying memory at : 0xffda is match with the expected CRC value: 0x769a
    [9/9/2019, 3:04:00 PM] [INFO] MSP430: Verifying memory at : 0xffe0 is match with the expected CRC value: 0xa9a9
    [9/9/2019, 3:04:00 PM] [INFO] MSP430: Verifying memory time elapsed: 0.134s
    [9/9/2019, 3:04:00 PM] [SUCCESS] Program Load completed successfully.

**Attention** This is a public forum