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.

TMS570LS3137 (rev B) - flash ECC - creating faults



Folks,

What is the recommended procedure to inject ECC faults into flash memory, to verify the correct functioning of flash ECC?  (_Not_ EEPROM or OTP; my understanding is the ECC mechanism is substantially different for those, being computed by the wrapper instead of the core.)

In particular, my options seem to be to deliberately flash an ECC error (using nowFlash, or variations on the F021 API), or to use DIAG_MODE 7. 

- Is there example code for DIAG_MODE 7?  Proper use seems subtle.  The TR (spnu499a, 5.6.2.6) says things like "Do a slave access of the desired address", which I'm not sure exactly how to do.

- Are there generally recommended procedures here?  We use the F021 API to flash the chip; maybe we could establish deliberately bad sections of data for verification.  Assuming we only read that memory at verification time, would that have any bad side effects?

Thanks!

-- egnor

  • Egnor,

    We use this method in inserting ECC error for Flash testing.

    (1) Create the coff file (.out) as normal. Note the memory range it occupies.

    (2) Create Flash ECC using the ECC470 tool. Save ECC to a separate file.

    (3) Open CCS and connect to simulator for a ARM CPU. Make all memory in the simulator as writable.

    (4) Load your coff file to simulator.

    (5) Open a memory window in CCS and make changes in the locations you desire.

    (6) Save back the memory content as coff file. The new coff file will have inserted errors.

    (7) Use NowFlash to program the ECC file and new coff file.

    If you use CCS 3.3, you need to have one more step after (6). Load the new coff file to meomry and save it again. There is a bug in CCS3.3 that the file save the first time does not have the correct endianness.

    Please let me know if the above procedure works for you.

    Thanks and regards,

    Zhaohong

  • Thanks for the detailed recipe!  That helps me understand the situation.

    I ended up writing something a little more self-contained that uses the F021 library with Fapi_DataAndEcc, passing it deliberately mismatched data and ECC values, which seems to work (with some caveats, which I'll bring up separately).