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.

TMS320F280049C: The question of ECC Option in CCS

Part Number: TMS320F280049C

Tool/software:

Hi! 

I'm trying to validate the ECC error detection on F28004x using the --ecc:data_error linker option in CCS. I added an entry like 0x086000,0x01 to flip a bit at that address. However, even after reading from the address and checking ECC error registers (e.g., Flash_getLowErrorStatus()), I see no indication of any ECC error — all ECC-related registers remain unchanged. I suspect this might be because I later overwrite that flash address during runtime using the Flash API (Fapi_issueProgrammingCommand), which could erase the injected error. Could you please help clarify: when exactly is the error injected by the linker — is it only embedded in the final output file? Also, to observe ECC detection working, should I avoid writing to that address after build time? And are there any restrictions on memory section, alignment, or ECC monitoring that I should consider to ensure the error is detected? Thanks in advance for your help!

  • Hello,

    I will look into this and provide a response for you tomorrow. Thank you for your patience.

    Kind regards,

    Skyler

  • Hi Ruidi,

    The error is injected during linking and will be present on the device when you load the program. If you want to detect an ECC error at that address, you should not be erasing it before you try and detect the ECC error. Please refer to the Error Correcting Code Testing section of the TMS320C28x Assembly Language Tools v22.6.0.LTS User's Guide for any restrictions when using the --ecc linker option.

    Kind regards,

    Skyler

  • Thanks for your answer. I understand from your response that the ECC error is injected during the linking stage and will be present on the device once the program is loaded. You also mentioned that I should not erase the address where the ECC error is injected, otherwise the error will be removed. However, in my application, I need to write my own data into flash and then verify ECC errors on it. To write data, I have to erase the flash sector first, but doing so seems to remove the injected ECC error.

    Could you please clarify:

    1. How can I write custom data into flash and still test ECC error detection?

    2. Is there a recommended method to manually inject ECC errors after programming the flash (e.g., by modifying the ECC bits)?

    3. If the linker-generated ECC error is meant for static data only, how should I proceed if my use case requires dynamic flash writes?

    Thank you very much for your help.

  • Hi Ruidi,

    1. You can inject the error in a flash sector/bank that doesn't contain your program/data.

    2. Yes, you can use the Fapi_DataOnly or Fapi_EccOnly modes to inject some ECC errors. See section 3.2.3 of the Flash API Guide.

    3. See number 2.

    Kind regards,

    Skyler