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.

RM57L843: FLASH ECC Data Correction Diagnostic Mode 7

Part Number: RM57L843
Other Parts Discussed in Thread: TMS570LC4357

Hello I have a few questions around 7.8.2.2 ECC Data Correction Diagnostic Mode 7: DIAGMODE = 7

This check is capable of being run on the full 7.4.4 Syndrome Table, is there a recommended procedure? Is running this test against one value sufficient? If the contents of flash are CRCed prior to execution by a boot loader for validity, what would be the primary benefit of running this ECC test versus generating a ECC error through Section 7.6 Deliberate ECC Errors for FMC ECC Checking.

Thanks!

  • Hello Dmitri,

    The primary purpose for having the Diag mode 7 is because the Cortex-R4/5 CPUs can speculatively fetch data or instructions as part of their normal operation. If it so happens that the speculative fetch accesses the intentionally faulty data at the test location, an exception will occur. This may or may not be a problem if you handle it correctly in your exception handler. i.e., if you diagnose the location of the fault and determine it to be the intentionally faulty location, then it can be cleared and return to normal operation. If you utilize Diag mode 7 to generate the error/test, then there is no risk of inadvertently generating an exception.

    For reference on how to implement the diag mode 7 test, you can use the SafeTI Diagnostic Library as a reference or even use that code directly.
  • Thanks Chuck,

    Following section 7.4.1 SECDED Initialization

    "Therefore care must be taken to generate the correct ECC for the entire flash space including the holes between sections and any unused or blank flash areas."

    If the entire flash space already has correctly generated ECC and the image integrity is checked through CRC, then it sounds like Diag mode 7 is unnecessary?

    The test is not implemented for the RM57 / TMS570LC4357 in the currently released SafeTI Diagnostic Library, it only contains a function stub "checkFlashECC" not implemented.