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.

MSP430 BSL F5xx error writing data block

I am working with MSP430F5342 via the BSL UART interface in circuit from a C5505. When I send bytes to write using BSL RX data block commands the response is correct but the data does not actually get written.

Here is the procedure i'm using

1. Invoke to enter BSL mode.

2. Mass Erase (ACK received)

3. RX Password (ACK received)

4. RX data block @0x4400 w/ 8bytes (I get a successful write response 0x00 0x80 0x02 0x00 0x3B 0x00 0x60 0xC4)

5. TX data block @0x4400 w/ 8bytes (data is either all 0xFF if a mass erase was performed or the old data if the correct password was entered to avoid mass erase)

All other commands seems to be working:

Rx Password - works

change baud rate - works

Rx Version - works 00.06.04.04

Erase Segment - works, erases 512 bytes

TX data block - works, all sizes 4->128 bytes

Check sum -works, calculates correct check sum on 8 and 16 bytes at a time possibly larger haven't checked

I have also checked wrong passwords, wrong check sums, malformed headers etc and get all the correct responses from the BSL.

I can program the MSP via JTAG and read it back using BSL and everything matches just can't write anything using the BSL.

Any ideas?

Thanks.

  • Hi Hunter,

    This seems really strange since you are getting the correct response back saying the data was written correctly, but it clearly is not since a TX data block on the same location returns the previous value.

    First, let me ask, is this the factory BSL, or have you or the distributor modified the BSL at any point?

    Assuming it is the TI Factory BSL, here are a couple things you can check:

    First, do a memory dump on the BSL memory (you can use the Elprotronic FET-Pro430 Lite software availed from here to read BSL memory).  Then download SLAA450 Creating a Custom Flash-Based Bootstrap Loader, and the associated zip file (linked in the abstract).  The zip file contains released BSL versions, so find the one for the F534x family with version 00.06.04.04, and compare to the memory dump from your device.  If there are any differences this is likely the problem.  You can then program the hex image included in slaa450 package and try it to see if it works.  Just make sure you have a backup of the original BSL contents saved somewhere on your PC in case you need it again.

    Next, try to capture the entire BSL communication on a logic analyzer (preferably with a UART bus analyzer) and post it so I can see exactly what the communication and responses are.

    A third test you can do, once you have saved the original BSL contents from the device, is build your own BSL from the example projects included in the slaa450 zip download.  There is a CCS project for a UART (timer based) BSL for the F54xx that can be modified to your F5342 by changing the part the project compiles for, the pins used (if necessary), and the linker file for the F5342 to program the device in BSL Flash (use the one for the F54xx included in the project as a reference for required changes).  There is also an example IAR project for the F552x that is a UART (timer based) BSL that can be easily modified if you are using IAR instead of CCS.  The same things needs to be modified.  The source in these projects is known good, so test to see if they work to verify there is not something wrong with the part.

    Mike

  • Thanks Mike for the thorough response!

    I was able to download the Elprotronic FET-Pro430 Lite software and dump the BSL memory section. It looks like three bytes don't match up between the BSL version 00.06.04.04 and the version on my flash (see attached PDF-diff print out). This MSP was a factory default and the BSL has not been modified. Could these errors be an artifact of an a certain programming process or a sign of failing flash?

    I am in the process of re-flashing the stock BSL version. I will post again with those results.

    2781.BSL.00.06.04.04.txt - Target_m.pdf

    --Hunter

  • Hunter,

    Thanks for the memory dump.  Since there are differences, I suspect this will mostly likely be the issue.  Were you able to test the BSL supplied in slaa450 to see if it works?

    Thanks,

    Mike

  • Mike,

    I was able to load the factory BSL in slaa450. Thanks for the help it is working now.

    --Hunter

  • Hunter,

    Thanks for letting me know it is working now.

    One more question for you:  are all your parts exhibiting this behavior and have corrupted BSL code, or is this the only one?

    Thanks,

    Mike

**Attention** This is a public forum