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.

MSP432P401R: Help with BSL-Scripter

Part Number: MSP432P401R

Hi,

I inherited a custom board with an MSP432401R on it. We wish to support remote programming on it. I have read about the bootloader (BSL), and found BSL-Scripter. I am receiving errors in BSL-Scripter. If anyone could help me I'd really appreciate it.

I invoke the BSL with this code:

BSL_INVOKE(BSL_UART_INTERFACE);

This SCI interface is working before I enter the BSL, so this is known good.

Here is my BSL-Scripter script:
LOG
//MODE p4xx UART 115200 COM3
MODE p4xx UART 9600 COM3 PARITY
RX_PASSWORD_32 .\pass256_default.txt
MASS_ERASE
RX_DATA_BLOCK_32 .\2110_Controller.txt
TX_BSL_VERSION_32
TX_DATA_BLOCK_32 0x0000 0x8000 readblock_2110.txt
//CRC_CHECK {ADDRESS} {LENGTH} {EXPECTED}
//or
//CRC_CHECK_32 {ADDRESS} {LENGTH} {EXPECTED}
REBOOT_RESET

And here is my output from BSL-Scripter:

Input file script is : c:/Users/bnehring/Desktop/boot/432_script.txt
LOG
//MODE p4xx UART 115200 COM3
MODE p4xx UART 9600 COM3
Initialization of BSL P432 succeed!
RX_PASSWORD_32 .\pass256_default.txt
Read Txt File : c:\Users\bnehring\Desktop\boot\pass256_default.txt
[ACK_ERROR_MESSAGE]Unknown ACK value!
MASS_ERASE
[ACK_ERROR_MESSAGE]Unknown ACK value!
RX_DATA_BLOCK_32 .\2110_Controller.txt
Read Txt File : c:\Users\bnehring\Desktop\boot\2110_Controller.txt
[ACK_ERROR_MESSAGE]Unknown ACK value!
Time elapsed of writing 256 bytes : 1.155 seconds
Speed of writing data :0.2165(kB/s)
TX_BSL_VERSION_32
[ACK_ERROR_MESSAGE]Unknown ACK value!
TX_DATA_BLOCK_32 0x0000 0x8000 readblock_2110.txt
Write Txt File : c:/Users/bnehring/Desktop/boot/readblock_2110.txt
[ACK_ERROR_MESSAGE]Unknown ACK value!
Time elapsed of reading 0 bytes : 1.011 seconds
Speed of reading data : 0(kB/s)
//CRC_CHECK {ADDRESS} {LENGTH} {EXPECTED}
//or
//CRC_CHECK_32 {ADDRESS} {LENGTH} {EXPECTED}
REBOOT_RESET

I've seen in the BSL documentation that TI recommends either the MSL430-BSL Rocket or the MSP-FET. I bought a Rocket, although I've realized it output TTL and I already have a 232->TTL converter on this port, so it's not going to work easily (without some soldering). Can anyone tell me if a PC serial port can be used with BSL-Scripter/MSP432, even though the documentation says it's not supported?

Again, any help would be great. I can provide any information that would be helpful.

Thanks!

-Brian

  • I forgot to mention that my serial port is connected to UCA0RXD and UCA0TXD (P1.2 and P1.3).

  • I read up in other threads here and learned there's a timeout in the BSL. I have to juggle a few apps to kick it off so I think the BSL was timing out on me.

    I am now getting a password error in BSL Scripter, which is much more understandable. I'll debug that and report back if I have more issues.
  • I got it working. It was confusing that the password is the first 256 bytes in the flash. I thought it was more of a user settable thing, and I suppose you could keep it constant if your first instruction is a jump. Regardless, it's all sorted and working now!
  • Hi Brian,

    Thanks for posting your findings!

    David
  • And what was the answer about using the Rocket?

  • Hello George,

    My apologies, it looks like I omitted your question, please read below:

    George Hug said:
    Can anyone tell me if a PC serial port can be used with BSL-Scripter/MSP432, even though the documentation says it's not supported?

    It is not possible to do this without a communication bridge, (a 232 to TTL converter or the MSP-BSL or the MSP-FET or just using the Launchpad XDS110 backchannel uart)

    Also, please be aware of the PARITY option on the BSL Script;

    PARITY [optional]

    This mode selects the parity of UART communication. The default setting in the BSL Scripter is without parity. When the PARITY is set in the MODE command, the BSL Scripter runs the UART communication with even-parity format. Most of the BSL devices communicate with the even-parity format in UART communication. With the presence of MSP-BSL (Rocket) or MSP-FET, the even-parity format is generated by these bridge devices. When using the MSP432 LaunchPad development kit that has a backchannel UART as communication bridge, the even-parity should be generated by the Scripter.

    Hopefully this helps.

      David

  • Oops, sorry I forgot about that. I successully programmed through the BSL with my PC's serial port. This is important to know and is not mentioned clearly in the documentation (that I could find). I think the BSL document (SLAU622E) should say that a PC serial port will work, but that you need TTL levels into the micro.

    I never used the Rocket. The 10-pin header on it was going to be difficult to use, plus I would need to jump to the other side of my 232<->TTL converter.

    If anyone needs help on this let me know!
  • Thanks, Brian, and congratulations on having one of the few remaining PCs in the universe with a serial port. :-)

    Not having such a PC myself, I was able to use BSLDEMO2, the predecessor to Scripter, to flash the G2553 using a USB-to-serial adapter, but found that the polarity of DTR was the opposite of what was needed. Since the source is available, I just recompiled with the correct polarity, and everything worked fine. The outputs of the adapter (I used the CP2102) are natively 3.3V, so already at the right level so long as the micro Vcc is 3.3V or higher, which by the way can also be provided by the adapter. I think maybe the USB adapters are simpler and cheaper vs the Rocket, or even a real serial port, for many MSP parts. You wouldn't need any of your 232-to-ttl circuit.

    It may be that such DTR polarity problems don't exist with Scripter and USB adapters, but if anyone has problems getting the micro's attention using either BSLDEMO or Scripter, that would be one thing to check.

    I did a long-winded writeup on using the USB adapters for BSL for the G2553 and even the lowly G2231, and even embedding an adapter along with the micro because they're so cheap, and so an ultimate user would only need a USB cable (no Launchpad) to flash new firmware. I planned to put all that on Github, but never quite got that done. Need to finish that I guess in case anyone might be interested.
  • I don't even think I'm using DTR. I only have TX and RX coming in to the micro. Does the BSL Scripter even care about DTR polarity?
  • Scripter may not use the DTR line at all. The older parts like the G2553 use a special pattern on DTR and RTS to put the micro into BSL mode. The newer parts flashed with Scripter may do it completely differently.
  • For reference, I send a BOOT command over the SCI interface, then I invoke the BSL. I think the TI docs recommend not doing this, but it works fine for me.

**Attention** This is a public forum