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.

BSL 00.06.05.34 Fails to load last 128 bytes via USB?

Guru 15580 points
Other Parts Discussed in Thread: MSP430F5515

MSP430F5515, BSL 06.05.34

I have written a PC-based USB bootloader application that writes a TI.TXT file to my MSP430F5515 custom board. All works correctly except for the last 128 bytes of flash (0x14380 - 0x143ff). When I send the BSL command I get a BSL Core response message of 0x00 (Operation Successful) for each USB packet sent, including the last 128 bytes. However, these last 128 bytes are 0xFF instead of the correct value.

Any idea what I could be doing wrong?

  • Hi Mike,

    I'm not aware of any problem in the F5xx BSL that would cause this. Does the same happen if you use the USB Firmware Upgrade Example from TI http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSP430_USB_Developers_Package/latest/index_FDS.html?

    Have you tried checking the packets (and perhaps comparing them with USB Firmware Upgrade Example) using a USB bus analyzer?

    Regards,
    Luis R
  • Actually, have you tried breaking the packet in smaller chunks? SLAU319 says that the F5515's BSL has a buffer size of 62 Bytes.

    Regards,
    Luis R
  • Luis,

    Luis RC said:
    Have you tried checking the packets (and perhaps comparing them with USB Firmware Upgrade Example) using a USB bus analyzer?

    Yes. I can see the correct data beings sent and a positive response from the BSL.

    Actually, have you tried breaking the packet in smaller chunks?

    All of my core commands are 62 bytes.

    SLAU319 says that the F5515's BSL has a buffer size of 62 Bytes.

    I do not see anything in SLAU319h about BSL Ver 06.06.34

  • Hello,

    The buffer probably is not getting flushed.  RAM BSL requires the host to send a read command, a CRC, a write command or a reset command to a new location in order to trigger a buffer flush.  This is because BSL buffers all data until a 128 byte block is received and then writes the data to device.  If an image did not end on a block boundary the data is not transferred to the device.  To flush the buffer send the device a dummy command after you have written data to device.  Try something like BSL_LOAD_PC command.

    Regards,

    Arthi Bhat

  • Arthi,

    Arthi Bhat1 said:
    RAM BSL requires the host to send a read command, a CRC, a write command or a reset command to a new location in order to trigger a buffer flush.  This is because BSL buffers all data until a 128 byte block is received and then writes the data to device.

    Hmmmm....That sounds like a pretty important thing to include in the documentation. Did I miss something?

    I worked around this issue by changing my linker file to end the load area before the last 128 bytes, which seems to work OK.

    ==============

    Edit: This stopped working when my file size changed. See below for fix.

  • Arthi,

    I tried BSL_LOAD_PC, which did not work. However, I then tried TX_BSL_Version which does seem to work.

    I highly recommend including this information in the documentation (unless I missed it).

**Attention** This is a public forum