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.

TMS320F28379D: How is ECC calculated for OTP memory?

Part Number: TMS320F28379D


Hi,

What is an algorithm for calculation ECC for OTP memory.

I saw some note that ECC is 16 bits long for each 128 bits of OTP memory.

Can you confirm that?

There is some description in FLASH API but size of data is different there (64 bits).

Regards,

Piotr Romaniuk

  • Piotr,

    This is partly correct, the min size that can be programmed at one time is for each 64 bits of data, there is 8 bits of ECC that get programmed.  So your 16 bits for 128 bits of data is also correct, but is not the minimum.

    Best,

    Matthew

  • Hi Matthew,

    thank you for clarification.

    I checked sample of code in FLASH API documentation (appendix, ECC calculation algorithm) and this is the algorithm that I have looked for.
    (the function returns uint16 but it is because this CPU has word 16 bits long; the result of the function is always 8 bits long)

    I can only add what is an order of bytes in ECC word.

    e.g.

    Block of 4 words (64 bits) in OTP 0x78010 - 0x78014 has ECC written at 0x107102 low byte.

        0x78010:    0FFF 0000 FFFF FFFF => ECC = 73
        0x78014:    0FFF 0000 FFFF FFFF => ECC = ED

    0x1071000:    FFFF FFFF ED73 ...  

    Regards,

    Piotr Romaniuk