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.
Hi Team,
Our customer hasMSP430F5529 connected to the external Flash device over SPI bus.
The customer wishes to upgrade the MSP430F5529 from external Flash memory.
1. How should the image data be formatted if the image came from the CCS hex file?
2. What is required to set up the MSP430F5529 device to reprogram its firmware image from external Flash?
3. What kind of checking should be done to avoid bricking the device?
Please let me know if you need other information from the customer.
Thanks!
Jonathan
Hello Jonathan,
To be sure I understand, the use case is that the MSP430F5529 will read the external flash via SPI and then re-flash itself? This is not a typical use case for MSP430's. This does seems possible but will require the creation of a customer BSL.
I would recommend as a first step that the customer look at and review the MSPBSL. This will give them a good idea for how field updates are usually implemented and provide example context.
The customer is going to have to develop a custom bootloader that will be a SPI master, read the image out of the external flash, and then write it to the flash of the MSP430F5529. There is information on creating a custom a BSL on the MSPBSL page, although this one might be more involved.
As for a check, I think the best option would be a CRC of the flash. All it will do is confirm that the firmware programmed into the device matches what is read out of the external flash, not that it works. When customizing the BSL, They could also find a way to implement an external hardware initiation of their BSL to read a new image. This could be a failsafe in case the previous image was bad/corrupt.
Hope this helps!
Thanks,
JD
Hi JD,
The links provided are helpful, and I will need to dive into the BSL capabilities.
Another deeper question, when I replace the factory BSL with a custom BSL and trigger it to re-program the MSP430F5529 firmware the external Flash device will need to hold the new firmware. I planned to load the external Flash over a wireless communication path with the updated firmware. When I take the intel Hex file from Code Composer Studio and write this directly into the external Flash will the BSL code that reads the external Flash successfully program the MSP430F5529 to now run with new firmware after a reset?
Thanks,
Ed
JD will know better than I do about this, but I looked into file formats when I was working on my SD card bootloader for the older G2xx parts, and I didn't see any BSL code that worked with hex files. So I think you would have to include your own hex parser in your custom BSL. There was no room for that in my bootloader, so I ended up writing a C program for Windows that took in a hex file and generated the binary flash image, and it was that .bin file that I saved to the SD card.
Hey Ed,
I agree with George. I don't know of a way to pass a hex file directly in. My understanding is that it needs to be converted to a flash image.
There is an app note on using Simplelink MCUs as BSL host for MSP430's, and section 5 discusses generating these images and I believe it provides some python scripts to automatically convert a TI hex file.
I think that app note, in general, would be very applicable here.
Thanks,
JD
Jonathan,
BSL is limited to 2KByte, so best way is to hold in SPI flash binary file. Once, when update is triggered, it can be done very fast using flash block write (over 100 KByte/sec, or over 200KByte/sec using smart block write). After flashing is done, BSL can check result by marginal read, and repeat update sequence if necessary or just update flash weak cells.
**Attention** This is a public forum