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.

MSP430F5659: Firmware Upgrade Corruption Issue

Part Number: MSP430F5659
Other Parts Discussed in Thread: MSP-FET

 Hi TI team,

Our Current Procedure for uploading firmware:

We connect the board with PC using USB interface cable. We put the MSP430F5659 board into boot mode.  Then we upload the firmware using the "Python firmware upgrade tool".

During uploading time if some Disturbance/Disconnection happened in the USB I/F cable. Firmware on the board erased. Then no firmware exists on the board and it is in the boot mode after the power cycle.

Our Issue:

When the firmware is erased as mentioned in the above case,  Again we try to reupload the firmware using the "Python firmware upgrade tool".

But sometimes in python firmware upgrader "READY" symbol not appears, So we cannot upload the firmware using a normal method instead we used the "FET Emulation Tool" with JTAG connector.

This is not a user-friendly method for the customer.

 

Our Requirement:

So to avoid this, We looking for a solution like this.

If any firmware erases during upload due to user mishandling, The board should automatically revert back to previous firmware without any user intervention.

 

Example:  If the board is having firmware 1.0 and user trying to upload 2.0, Due to some reason while uploading  2.0 some disturbance/disconnection happened in USB I/F cable.

In this case, if the board is restarted then it should have firmware 1.0.

 

Kindly advise on this requirement on high priority.

 

Thanks and Regards

Manoj

 

 

 

 

 

  • MSP430F5659 is device with huge flash, so I guess that firmware size is not small. The easiest way is to use TI factory HID BSL, but it is slow (flash block write is not used), and there is downloading of updated BSL RAM from PC, first. There is time that during flashing something goes wrong.

    For this problem I probably write my own 2 KByte CDC BSL stored in BSL segments with all needed functions, without downloading BSL RAM from PC, with flash block write (over 100 KByte / sec). In this case time interval when something can go wrong should be significant shorter. Also with my CDC PC side, without possibility to ask myself for "READY" signal. Of course, serious coding is needed, but this bullet prof solution can be re-used many times on any MSP430 USB member.

    If I remember right, this request (in red) is how MSP-FET firmware update is done, so you can find it inside MSP-FET firmware in open source MSP Debug Stack (http://www.ti.com/tool/MSPDS

  • HI Manoj,

    As you say "But sometimes in python firmware upgrader "READY" symbol not appears", maybe repower it can solve this problem.

    About your request "If any firmware erases during upload due to user mishandling, The board should automatically revert back to previous firmware without any user intervention", you can do that by yourself, but we can't supply this feature. The most important thing is that you need another flash memory to save firmware 1.0. As F5659 has 512KB memory, to realize this function, you can only use 256KB. It is unacceptable by all the customers.

    Eason

  • Hi Eason

    Thanks for your reply.

    "The most important thing is that you need another flash memory to save firmware 1.0. As F5659 has 512KB memory, to realize this function, you can only use 256KB. It is unacceptable by all the customers."

    Please explain the below

    I couldn't get your point. To achieve my requirement, You said I should use another flash memory to store 1.0(Is it external flash memory?), In that case, we can only use 256KB of internal flash memory? Why it is getting limited from 512KB to 256KB due to additional flash?

    Best Regards

    Manoj

  • You must split device internal  flash on half, to hold both, old and new firmware (max 256KB for each). Then on startup, your code by marginal read CRC check can decide to run the new one if CRC values match. If CRC value is different than it should run another (older firmware version with correct CRC). AFAIK, in this case your firmware must handle two vector (IRQ) tables.

  • Hi Zrno Soli,

    Thanks for your reply..

    Practically it is difficult for our application to limit the firmware size within 256 KB. Currently, it is 350KB around. I believe this solution(Splitting the flash) will not work out for the case. What's your opinion?

     

    Your previous recommendation as below

    "MSP430F5659 is device with huge flash, so I guess that firmware size is not small. The easiest way is to use TI factory HID BSL, but it is slow (flash block write is not used), and there is downloading of updated BSL RAM from PC, first. There is time that during flashing something goes wrong.

    For this problem I probably write my own 2 KByte CDC BSL stored in BSL segments with all needed functions, without downloading BSL RAM from PC, with flash block write (over 100 KByte / sec). In this case time interval when something can go wrong should be significant shorter. Also with my CDC PC side, without possibility to ask myself for "READY" signal. Of course, serious coding is needed, but this bullet prof solution can be re-used many times on any MSP430 USB member.

    If I remember right, this request (in red) is how MSP-FET firmware update is done, so you can find it inside MSP-FET firmware in open source MSP Debug Stack (http://www.ti.com/tool/MSPDS"

    Kindly reply in the below format for queries.

    My queries:

    1. BSL handles firmware upload in the flash. When we upload firmware first it copies the binary data into RAM(which CPU uses) then copy into Flash?

    Your Reply:

    2. If my 1st question make sense then BSL and Main Firmware share the same RAM in msp430f5659?

    Your Reply:

    3. For uploading BSL, Is there any special procedure involved? Please advise

    Your Reply:

    4. You Say "without downloading BSL RAM from PC, with flash block write (over 100 KByte / sec)"  I couldn't get this. Kindly elaborate 

       This is my understanding.BSL uploading is Only one time after that during firmware update only main firmware written in flash(Excluding BSL).

      What do you mean by without downloading BSL from PC?

    Your Reply:

    5. If we write OWN CDC as recommended by you. We still use a python firmware upgrade tool to upload? And don't need to wait for a ready signal?

    Your Reply:

    Thanks and Regards

    Manoj

  • Hi Manoj,

    1. BSL handles firmware upload in the flash. When we upload firmware first it copies the binary data into RAM(which CPU uses) then copy into Flash?

    Your Reply: Yes, it save all the data in RAM for one communication package.

    2. If my 1st question make sense then BSL and Main Firmware share the same RAM in msp430f5659?

    Your Reply: Yes.

    3. For uploading BSL, Is there any special procedure involved? Please advise

    Your Reply: If you talk about downloading code through BSL, you need to use TEST and RST pin to invoke BSL. You can refer to this document: www.ti.com/.../slau319ab.pdf

    4. You Say "without downloading BSL RAM from PC, with flash block write (over 100 KByte / sec)"  I couldn't get this. Kindly elaborate 

       This is my understanding.BSL uploading is Only one time after that during firmware update only main firmware written in flash(Excluding BSL).

      What do you mean by without downloading BSL from PC?

    Your Reply: I think he is talking about using the default BSL to download a new BSL into RAM and use it to download firmware. It will be much faster.

    5. If we write OWN CDC as recommended by you. We still use a python firmware upgrade tool to upload? And don't need to wait for a ready signal?

    Your Reply:Yes. But I guess, if it can't work after re-power on, the code in BSL segment is broken, because it can be erased!

    Eason

  • Hi Manoj,

    Have your problem solved?

    Eason

**Attention** This is a public forum