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: nERROR pin triggers but ESM does not flag the reason

Part Number: TMS570LC4357
Other Parts Discussed in Thread: NOWECC

Dear Sirs.

We are using the TMS570LC4357 part in a Safety Critical application where the nERROR pin is used to inform the System about a Hard Fault.

We see the pin going low (error) but we cannot identify the cause in the ESM module, no flag seems to be set.

The part of the code that seems to produce the error is auto-generated by a tool and therefore difficult to debug.

Any clue to help us catch this bug would be highly appreciated. Thank you in advance.

  • Hi again.

    I have additional information to share related to this issue.

    As the point where we saw the nERROR getting low was quite unclear, we suspected that the issue could be related to the Flash ECC.

    One of my colleagues has tried using the nowECC tool instead of the Code Composer to generate the ECC codes. This method has solved the issue, the nERROR does not trip inadvertently any more. Strangely enough, now we can use back the Code Composer method to generate the ECC codes and it does not fail.

    It looks like the memory was somehow "corrupted" and the nowECC tool fixed it in such a way that now we can use Code Composer again to generate the ECC codes.

    Even if the problem has been solved, we'd like to have an assessment from your side to understand what's going on behind the scenes.

    Thank you.

  • Hi Txema,

    As the TRM stated, the ECC values for all of the Flash memory space (Flash banks 0 through 6) must be programmed into the Flash before the program/data can be read.

    The Cortex R5F CPU may generate speculative fetches to any location within the Flash memory space. A speculative fetch to a location with invalid ECC, which is subsequently not used, will not create an abort, but will set the ESM flags for a correctable or uncorrectable error. An uncorrectable error will unconditionally cause the nERROR pin to toggle low. 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.

    The best way is to generate the ECC of the whole flash using Linker CMD script.

  • Hi Wang.

    That explanation makes perfect sense. I still don't understand though why the Code Composer is not performing it's function to correctly generate the ECC codes.

    May we consider that a bug?

    FYI, we are using version 9.3.0.00012 with the following settings:

    * Linker "Control whether ECC generation is on or off (--ecc)" to "on"

    * Flash Settings "Auto ECC Generation" not checked and "Flash Verification" to None (it fails otherwise)

    Thank you.

  • * Flash Settings "Auto ECC Generation" not checked and "Flash Verification" to None (it fails otherwise)

    6 years ago in Bus ECC ESM error signaled on TMS570LC4357 with cache enabled when read from a partially programmed cache line in flash queried the need to set "Flash Verification" to None, in case there was a failure in programming the flash which then wasn't reported.

    The issue was believed to be in the CCS flash loader. Not sure if a bug was raised on CCS.