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.

TMS570LC4357: Unable to test ECC on Flash

Part Number: TMS570LC4357

Dear Sirs,

We have implemented a function inside our code to detect and log Flash ECC faults. It is based on polling the status of the ESM flags and updating a status register accordingly, which is sent through telemetry.

In order to test proper behaviour, we inject an ECC error through the Linker option --ecc:ecc_error:[Address],[Mask].

But what we see instead is either a call to dabort() or a corruption in register R13, which causes a reset of the board when a function tries to return (ldm R13!, {PC}).

Is this an expected behaviour? If a wrong Flash ECC produces a reset, then what is the benefit of having an ESM module to capture these events?

Thank you.

  • Hi Txema,

    I didn't try to inject ecc error through linker cmd. I recommend the Safety Diagnostic Library (SDL) for memory ECC selftest. The SDL provides interfaces to the safety mechanisms of the device. The library is a collection of functions for access to safety functions and response handlers for various safety mechanisms.

    https://www.ti.com/tool/SAFETI_DIAG_LIB

  • Hi Wang, thank you for the response.

    Well, SDL is handy, but it leaves dead code behind. As the intention is to test if our code identifies and flags the error, we don't need to run the test as part of a BIT sequence, that's not the intention. So injecting the fault once and testing the behaviour of our code is what we really want.

    Anyhow, I worked a little more with this issue and found out that apparently the dabort was cause by some side-effect. I repeated the test and after some changes the code is working now.

    Interesting to mention for any other interested reader that the flag in the register Esm1.Stat2 (the group 2 status register) got cleared "by somebody" that I was not able to identify. Seemed like the ISR was called, but putting a breakpoint there did not stop, so I don't really know why and how the register was cleared. Luckily there is a Shadow register for Stat2, so I was able to use that one instead and correctly detect Flash ECC errors polling the ESM module.

    Best.