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.

TMS570LS1224: ECC usage with EEPROM Emulation FEE

Part Number: TMS570LS1224
Other Parts Discussed in Thread: HALCOGEN

Hello all,

I use the the bank 7 sectors 0 to 3 as non volatile memory (EEPROM emulation). I do not use the FEE Library by provided by TI but I use my own ware leveling algorithm which I already used on other micro controllers which all works fine so far.

Now I want to benefit form the ECC feature. As far as I know each 64 Bit of data word is secured by 8 bit ECC. So I make sure that all data is written in multiples of 8 bytes. For the write commands I alredy use use the mode Fapi_AutoEccGeneration.

Fapi_issueProgrammingCommand((uint32_t*)u32_Addr, &(u8_Buffer[0]), u8_idx, NULL, 0, Fapi_AutoEccGeneration)

I far as I believe the ECC bits should therefore generated correctly for every write.

If I erase a complete sector, do I have to care about the ECC bit or do they also be set correctly for a erased 64 bit data word?

Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector, flash_sector[Sector].start) ;

When I now want to be informed in case of a data/ecc mismatch when reading EEPROM data I need to configure the ESM.


Do I also have to activate the FLASH ECC when I only want to check the EEPROM (bank 7) ECC?

And I guess I will get an ESM exception:

By the way why can't  this Interrupt not be dsabled or changed to FIQ in HALCOGEN?

Is there any code Example code how to handle ESM exceptions avalable especially get the reason (ECC mismatch, including address infomation, ... ) ?

Kind regards
Jens

  • Hi Jens,

    If I erase a complete sector, do I have to care about the ECC bit or do they also be set correctly for a erased 64 bit data word?

    No need to take any special action for erase.

    By the way why can't  this Interrupt not be dsabled or changed to FIQ in HALCOGEN?

    It is NMI(Non Maskable Interrupt), we can't disable it.

    --
    Thanks & Regards,
    Jagadish.

  • Hello Jagadish,

    thank you very much for your prompt reply. When writing to the bank 7 flash using Fapi_AutoEccGeneration mode and with a multible of 8 Bytes will the ECC bit automatically generated and will I get an exception during read when the ECC bit does not match with the data?

    Is there any code Example code how to handle ESM exceptions avalable especially get the reason (ECC mismatch, including address infomation, ... ) ?

    Kind regards,
    Jens

  • thank you very much for your prompt reply. When writing to the bank 7 flash using Fapi_AutoEccGeneration mode and with a multible of 8 Bytes will the ECC bit automatically generated and will I get an exception during read when the ECC bit does not match with the data?

    Yes, you are correct. If we write using Fapi_AutoEccGeneration then corresponding ECC for data will also get programmed into ECC section.

    If either ECC or data gets corrupted, then we will get ESM errors based on single bit or double bit errors.

    Is there any code Example code how to handle ESM exceptions avalable especially get the reason (ECC mismatch, including address infomation, ... ) ?

    There is no specific code for handling ESM exceptions, it just depends on the application requirements. Depends on the application requirement either we can do software reset or else we can stop further execution etc can be perform.

    --
    Thanks & Regards,
    Jagadish.

  • Hello Jagadish,

    is there a way to force an ECC error to be able to test the the ECC error detection?

    Kind regards,

    Jens

  • Hi Jens,

    is there a way to force an ECC error to be able to test the the ECC error detection?

    Yes, we can do that using flash diagnostic modes.

    For more details about this implementation you can refer safeTI diagnostic library

    SAFETI_DIAG_LIB Driver or library | TI.com

    If you download this library, then you can import the project and you can see the definitions for the different diagnostics.

    As you can see, you can find the different fault injection codes for flash and FEE etc.

    --
    Thanks & regards,
    Jagadish.

  • Hello Jagadish,

    thank you very much!

    Regards
    Jens