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.

TMS570LS1114: nowECC correct params

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

Hello,

I have several questions about ECC generation iside CPU.

1) I generate ECC using nowECC tool with the following params:

nowECC.exe  -r4 -l -F021 16M_ADD  -i <input > -o <output>

But, the output file I get differs from the one, generated by CPU. It has no mirroring of two bytes in DWORD:

generated:

68 1C 7B 03 0F 10 E6 CC 02 7A 14 8A 71 0A FB F7
1D 9F CE 88 26 92 D5 5E 13 AE 93 3B B7 2C 25 2E
C5 4D E3 76 05 9B 94 4A B3 D0 CE E8 5D 09 38 A0
29 B8 C7 C6 D5 6C 09 63 A8 EF 6C C7 E8 5B 70 AE
42 1F F4 B6 1C CB DA 81 5D C3 63 76 71 01 C4 09
B3 D7 67 39 98 28 05 B8 80 9E CF DA EF B1 90 B2

actual:
68 1C 68 1C 0F 10 0F 10 02 7A 02 7A 71 0A 71 0A 1D 9F 1D 9F 26 92 26 92 13 AE 13 AE B7 2C B7 2C C5 4D C5 4D 05 9B 05 9B B3 D0 B3 D0 5D 09 5D 09 29 B8 29 B8 D5 6C D5 6C A8 EF A8 EF E8 5B E8 5B 42 1F 42 1F 1C CB 1C CB 5D C3 5D C3 71 01 71 01 B3 D7 B3 D7 98 28 98 28 80 9E 80 9E EF B1 EF B1

The question is: how to generate the same data?

2) When I update flash using flash loader, ECC data is updated automatically or not? For all flash areas? Or it needs some code to be executed?

Many thanks.

  • Thanks for posting your question.
    Our response may be delayed due the holidays.
  • Hi Zend,

    I will check for you. 

  • Hello Hi Zend,

    If you select "Auto ECC Generation" in CCS flash load setting, the ECC will be generated and programmed automatically.

    I compared the nowECC generated ECC, CCS generated ECC, and flash API generated ECC. They are exactly same:

    1. ECC generated by nowECC: 

    2. ECC generated by CCS loading:

    In your ECC data, is the actual ECC the ECC generated by nowECC?  How did you generate ECC inside CPU?

  • When I upload flash to CPU (via Jlink),  FLASH-ECC is autogenerated.

  • Got it, you use CCS or uniflash to generate and program the ECC automatically when loading. I used the same way in my test.

    Did you use the feature of "mirror" in nowECC to generate ECC?
  • I couldn't find that param (mirror). Can you tell me how to make it?

    Thanks

  • Hello Zend,

    Is your actual ECC generated by nowECC?

  • Hi,

    No. The first numbers are generated by newECC, the actual values are generated by CPU itself, after flash uploaded to it.
  • Hello Zend,

    This issue is caused by the ECC reading in the IDE you used. The Flash banks are 144-bit wide bank with ECC support. The ECC bytes must be read as bytes or halfwords. Reading a single ECC byte with ECC enabled will actually cause 144 bits to be read from the flash.

    If you read the ECC as words (32-bit), you will get mirrored ECC, but it doesn't mean you have wrong ECC in ECC area. In CCS gel file, we specify that the Flash ECC is read in 2-bytes.

    • memmap(memSel){
    •    GEL_MapOff();
    •    GEL_MapReset();
    •    /* Flash / RAM Definition */
    •    if(memSel == FLASH){
    •        /* Flash Definition */
    •        GEL_MapAdd(0x00000000, 0, 0x00060000, 1, 0); /* Internal Flash ()     */
    •        GEL_MapAddStr(0xF0400000, 0, 0x0000C000, "R|AS2", 0); /* Internal Flash ECC    */        
    •        GEL_MapAdd(0x08000000, 0, 0x00008000, 1, 1); /* Internal RAM          */
    •        GEL_MapAdd(0x08400000, 0, 0x00008000, 1, 1); /* Internal RAM ECC      */
    •        GEL_MapAdd(0x20000000, 0, 0x00060000, 1, 0); /* Mirrored Flash        */        
    •        GEL_MapAdd(0xFE000000, 0, 0x01000000, 1, 1); /* CRC/PSA               */
    •    }

    If changing AS2 to AS4, IDE will read the ECC as word (4 bytes) and display the mirrored ECC. Please check your IDE to make sure the ECC is read as byte or halfword.