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.

单闪:Uniflash failed to program ECC in unused Flash address, with “vfill” function

Part Number: UNIFLASH
Other Parts Discussed in Thread: TMS570LS1114, TMS570LS3137

Hi team,

My customer is using uniflash to program TMS570LS1114, and used TI cmd linker file to generate ECC for all flash address.

But sometimes uniflash cannot successfully program correct ECC in to unused flash address.

Below is the comparison of successfully programmed case and unsuccessful case, both are same programming setting and same programming progress.

Uniflash settings:

1. Successfully programmed case: see in the last few seconds of the video, the value of unused flash address are programmed by ECC.

2. unsuccessfully programmed case: see in the last few seconds of the video, the value for unused flash address are still 0xFFFFFFFF, not programmed with ECC.

However, when customer use “fill" not "vfill" function to fill flash ECC, also program 0x5A5A5A5A to the unused flash, not 0xFFFFFFFF like vfill method, then seems so far no unsuccessfully case happen again.

I noticed there was similar issue posted about "vfill not programmed with ECC".

Can you pls help suggest: for unused flash address, is uniflash can only recognize the ECC generated by fill command? Vfill generated ECC for unused flash cannot be recognized by uniflash?

If yes, why?

Thank you!

Best regards

Yunjing

  • Hi Yunjing,

    The "Entire Flash" should be checked to program unused flash and it's ECC space. 

    Which version of Uniflash is used?

  • Here is some information on the difference between fill and vfill.  vfill requires the erase step prior to programming.

    What is the difference between:

       FLASH0  (RX) : origin=0x00000020 length=0x001FFFE0 vfill = 0xffffffff

    and

       FLASH0  (RX) : origin=0x00000020 length=0x001FFFE0 fill = 0xffffffff

    The former (vfill) doesn't cause the linker to output the fill value of 0xFFFFFFFF over the entire region specified. Instead, it instructs the linker to treat the memory region as if it is filled with 0xFFFFFFFF when the linker calculates the data values for the ECC regions.

    The latter (fill) would actually output all of the flash contents plus fill data for the flash.

    The difference between the two options is mainly significant when using a slower debug probe like the XDS100 class probe that is included on the launchpad. Using vfill will result in a download size that is the size of the program plus ECC data (about 512K). Whereas using the 'fill' directive would mean downloading a 4 MByte image even for a small 'blinky' program.

    Assuming flash is erased before programming - both choices will result in the flash being programmed with valid ECC contents for every address - but the vfill based .out file program in about 1 minute instead of 4-5 minutes.

  • Thanks John. I had a conf call with customer, and they understand the difference between vfill and fill. They use vfill for the whole flash except for the exception vector table (the first 8 32-bit words). The ECC value of unused flash is calculated assuming the unused flash content is 0xFFFFFFFF, and the ECC value is included in *.out file. You are correct, the entire flash has to be erased before loading the program.

    The uniflash is used to load the *.out file to MCU flash in their product line, and most of the boards are correctly programmed. They noticed that a few boards are not programmed successfully: the code and its ecc are loaded correctly, but the ECC of the unused flash are not programmed. Reloading doesn't solve the issue. But after power on reset, the board can be programmed correctly (used flash and unused flash).  

  • Hi Qingjun, John

    Customer use "Entire flash Erase option" as you listed, uniflash version 7.1.0.3796. 

    The erase process bar indicates all the flash are already been erased successfully.

    However,  using vfill method still cannot load ECC to the unused flash, as Qingjun described.

    Can you pls check if any other extra configuration need for uniflash when using vfill generate ECC? Or any update for this version uniflash and other version can fix this issue? 

    Thanks!

    Yunjing

  • Yunjing, thanks for providing the detailed information.

    Dr. Meng mentioned in the conf call, he can reproduce the issue by

    1. enabling "Auto ECC Generation" , and loading the code  --> the flash is erased, but the code loading fails

    2. disabling "Auto ECC Generation", then loading the code, --> produce the issue (the ecc of unused flash is not progrmamed)

    I tried this way, but I am not able to reproduce the issue. 

    Can you please check with Meng how to reproduce the issue? Thanks

  • Hi Qingjun,

    They use same process with you to reproduce the issue. But whichTMS570 project you are using? Seems the TMS570LS3137 code that customer shared is not include Vfill and ECC generation in cmd file, you need to add this part into the code.

    An update for your information, when customer reproduce the issue, they can still be able to erase all Flash address value, and all the value can be erase as 0xFFFF. However, when they done the erase and then load the program(ECC generated through vfill method), the unused flash ECC still cannot be programmed successfully.

    Let me know if you find a way to reproduce this issue in your side and get any solutions to solve it. Thank you!

    Best regards

    Yunjing 

  • Closing this post since followed up offline.