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.

Linux/MSP432P401R: programming MSP432 using BSL UART

Part Number: MSP432P401R
Other Parts Discussed in Thread: UNIFLASH

Tool/software: Linux

Hi,

we are able to program exp-msp432p401r launchpad through JTAG using CCS. We want to known how to flash msp432 using BSL UART.

how to flash .txt firmware in msp432 launchpad from pc? can we use msp430 usb firmware upgrade tool for this?...

  • Hi,

    the best starting point when using the MSP BSL is the Bootloader (BSL) for MSP low-power microcontrollers web page. You'll find links to the relevant documents and an overall explanation on how to use the BSL (both with MSP430 and MSP432 SimpleLink MCUs).

    This should help you to get started.

    Best regards,

    Britta

  • Hi Britta,

    Thanks for your reply,

    I have gone through this. so as per my understanding, the article says we need a programmer to burn the firmware to MSP432.
    Are you saying there is no other way to flash the firmware from PC without any external programmer hardware?..
  • I did a quick search of the web and found this. It might be a good starting point for you.

    github.com/.../MSP432Bootloader
  • Hi  

    It was really helpful but we are facing problem on the same,

    When we flash the program (Hex file). It shows "flash error" and the author defined the error as follows

    "Flash program error. Make sure you're not attempting to program the lower 4k of memory or any SRAM"


    We couldn't able to debug this error..

    Please see the inline of what we did,

    1.Ran python script in command prompt

    2.Pulled down reset and Pin 1.1

    3.Reset pin released

    In command prompt it prints the first line values in the .hex file and then exits and shows this error

  • Hello Vishnu,

    let me try to answer some questions here:

    • can we use msp430 usb firmware upgrade tool for this?
      • No, that is a different tool to update MSP430 devices which has USB protocol bootloader
    • Are you saying there is no other way to flash the firmware from PC without any external programmer hardware?
      • if you are using the launchpad, you can use the "Application UART" port from XDS. make sure you connect to the "Application UART" instead of "Debug Port".

    There are several things you need to make sure before communication with the 432 bootloader.

    • bootloader is running when the main memory is empty
    • if the device is already programmed, then the bootloader won't start
    • you can enable the hardware invocation by setting up the flashmailbox as described in http://www.ti.com/lit/an/slaa659d/slaa659d.pdf

    Documentation about the bootloader protocol is : http://www.ti.com/lit/slau622

    I am not familiar with the python application that is linked here. what is required to start the UART bootloader is to start the communication with sending 0xFF byte for the auto-baud of the bootloader, so the bootloader understand the speed that we run.

    • if you are using the launchpad, you can use the "Application UART" port from XDS. make sure you connect to the "Application UART" instead of "Debug Port".


                  I have tried that way too in CCS. Instead of selecting debug prob, I have selected UART Connection. But I cant able to change the COM Port from 14. Its fixed in CCS i think..     

                  so i got the error "Couldnt able to open COM14 at 9600 baud"

    • Help me to overcome this error " Flash program error. Make sure you're not attempting to program the lower 4k of memory or any SRAM."     what is this?

               I am posting some part of my intel hexcode below,

    :020000040000FA
    :200000007F454C460101010000000000000000000200280001000000E5290000C0EE02009E
    :2000200020EF020000000005340020000300280020001F000000000000000120272B000079
    :20004000430B0000430B0000430B0000430B0000430B00000000000000000000000000001A
    :2000600000000000430B0000430B000000000000430B0000430B0000430B0000430B0000AC
    :20008000430B0000430B0000430B0000430B0000430B0000430B0000430B0000430B0000F0
    :2000A000430B0000430B0000430B0000430B0000430B0000430B0000430B0000430B0000D0
    :2000C000430B0000430B0000430B0000430B0000430B0000430B0000430B0000430B0000B0

  • Hi Vishnu,
    In CCS, I am not aware that we can use the bootloader mode to download the program. we have a standalone tool to test the bootloader: software-dl.ti.com/.../index_FDS.html

    or now the UniFlash programmer has the capability of bootloader programmer too:
    processors.wiki.ti.com/.../CCS_UniFlash_v4.6.0_Release_Notes
  • Hi Vishnu,

    as we didn't hear back from you after the last reply to your questions we assume that your issues has been solved.
    Please note that I will close this thread now. In case there are any open questions left or in case of a new question please use the "Ask a related question" and "Ask a new question" button respectively.

    Best regards,
    Britta
  • Hi Guyz,

    Atlast we are able to program the device through UART,

    we have successfully done both hardware and software invocation of the boot-loader.

    Please see the inline of what we have done,

    For hardware invocation,
    1. We got a code from one of the TI forum with all the flash-mailbox header-files. flashed the code once and re-flashed it with application code.
    2. We have edited the one reg value of the code where it invokes BSL UART. you'll get the code from this link (e2e.ti.com/.../595010
    3. Now we have to use the BSL scripter which you can get it from this link. (www.ti.com/.../MSPBSL
    4. we also need to edit the scripter file with corresponding COM Port and corresponding TI hex file name (it is easy)
    this link talking about BSL scripter (www.ti.com/.../slau655f.pdf).

    So whenever HW invocation is done, run the BSL scripter immediately before 10s from the terminal with updated COM-Port and TI text file name of the code to flash.
    there you go..( first try the TI text file example in the BSL scripter folder)

    For SW invocation,
    1. We have embed the code in the page 6 of this link (www.ti.com/.../slau622h.pdf) into our application code.
    2. We have changed the gpio pins for our convenience..
    3. Now flash the code.
    4. So whenever the gpio pin(or corresponding event occurs) it enters the Boot-loader mode.
    5. Then Immediately run the BSL scripter before 10s with updated COM-Port and TI-txt file name..
    there you go..

    The major thing you have to consider is,
    Whenever hardware or software invocation is done, the Boot-loader responds with a 0xFF value and wait for the data from script for less than 10s. After that it will enter into Low-power mode, then the flashing cannot be done.

    If you got any error like "Initialization failed" it means you are not connecting to correct COM-Port or you have taken 10s more to run the BSL script.

    Thanks Fatmawati Santosa, Todd Anderson, Britta ruelander

**Attention** This is a public forum