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.

  • Resolved

BSL 00.06.05.34 Fails to load last 128 bytes via USB?

Guru 15720 points

Replies: 6

Views: 502

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?

Thx,

MikeH

 

  • 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

  • In reply to Luis RC:

    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

  • Guru 15720 points

    In reply to Luis RC:

    Luis,

    Luis RC
    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

    Thx,

    MikeH

     

  • In reply to MikeH:

    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

  • Guru 15720 points

    In reply to Arthi Bhat1:

    Arthi,

    Arthi Bhat1
    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.

    Thx,

    MikeH

     

  • Guru 15720 points

    In reply to Arthi Bhat1:

    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).

    Thx,

    MikeH

     

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.