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: EE emulation and ECC feature

Part Number: TMS320F280049C
Other Parts Discussed in Thread: C2000WARE, HALCOGEN

Hello support,

I'm reading the document "EEPROM Emulation With the TMS320F28xxx DSCs" (SPRAB69–September 2009) in order to understand what could be a good method to organize and handle an EE emulated.

The document is based on some C examples that I could not find in C2000ware 3_03_00_00, but in any cases it states that 3 are the different statuses that each bank can have:
• EMPTY_BANK
• USED_BANK
• CURRENT_BANK

I can understand it, and I can guess that

• EMPTY_BANK can be 0xFFFF
• USED_BANK can be 0x0000
• CURRENT_BANK can be 0xFF00

so that I can change the status of the bank simply writing some ZEROes to the ONEs in flash.

This is a general simple strategy.

Now, the question:

in F280049C there is ECC feature and Flash API document states that "Once ECC is calculated and programmed for a 64-bit data, those 64 bits can not be reprogrammed (unless the sector is
erased) even if it is programming a bit from 1 to 0 in that 64-bit data, since the new ECC value will collide with the previously programmed ECC value."

This means to me that I cannot use the strategy above as it is, because any further writing after the first, to any 64bit dataword, will generate an ECC issue. Am I correct ?

Or is there any possibility on F280049 to by-pass the ECC issue and write multiple times the same 64bit dataword ?

Your answer will change the complexity of my EE emulated management.

Thanks

  • David,

    This device has ECC and you can not modify a location that is already programmed with ECC.  Concepts in SPRAB69 can be reused but should be modified for ECC reasons.  

    Does your application need ECC protection for the flash memory?  Or is it ok to skip ECC protection?  

    Thanks and regards,

    Vamsi

  • Hello Vamsi,

    my application is ASIL, therefore the ECC protection could be probably used, at least for sectors containing Application code.

    Can the ECC protection be disabled only for the Flash sectors that are going to be used for EE Emulated ? From the RM it seems to me not possible.

    Could you confirm ?

    Do you see any other possibility ?

    Thanks

  • Davide,

    If it is ASIL, I would suggest to enable the ECC protection.  

    There is no provision to disable ECC for selected sectors. 

    Regarding other possibilities: 

    1. Application can disable ECC-check before accessing the sectors that have EEPROM emulated data.  But, this would mean ECC protection is turned off for the application code executing from flash to read the EEPROM data.  Hence, this is not a clean solution I guess.  

    2. You can develop an EEPROM driver by looking at the Hercules EEPROM driver.  See below links.

    User guide link for the Flash EEPROM driver http://processors.wiki.ti.com/images/8/88/TI_FEE_User_Guide.pdf

    The example is included in HALCoGen tool (http://www.ti.com/tool/HALCOGEN)  for device “TMS570LS31x_21x” (C:\ti\Hercules\HALCoGen\v04.07.01\examples\TMS570LS31x_21x\example_TI_Fee_Write_Read)

    Instead of using F021 Flash API 2.0 (Hercules API), you have to instead use F28004x flash API – but the concept is similar.  Hercules devices also have ECC similar to that of F28004x.  Their core is ARM (byte-addressable) and C28x memory is 16-bit addressable.  

    Thanks and regards,

    Vamsi