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: Flash memory after enable SECDED for ATCM interface

Part Number: TMS570LS1224

Hello,

after the flash memory is erased and the (bootloader) program is loaded - all unused memory is nicely blank (0xFFFF). However the enabling of SECDED logic for ATCM interface (the execution of _coreEnableFlashEcc_ function) cause this (screenshot of CCS memory browser):

In the linker file there is a 16-bit memory section specified where a safety key value shall be saved after bootloader accept and load application software:

M_SAFETY_KEY (R)   : origin=0x00014000 length=0x00000002

SAFETY_KEY              : type=NOLOAD > M_SAFETY_KEY 

Then, in a source file there is const volatile variable u16_key defined with #pragma DATA_SECTION(u16_key, "SAFETY_KEY").

Reading data on ???? addresses cause data abort - double bit error detection. As You can see at the screenshot above, the safety key location is ????, therefore the abort occurs.

1. Is that because the correct ECC values for these locations are not computed in the flash ECC memory? If so - why?

2. And why unused flash memory is not 0xFFFF after the SECDED logic is enabled?

With regards,

Tomas

  • Hello Tomas,

    When the flash is erased, it's ECC area is also erased. The content in both areas are 0xFFFFFFFF, this means that the ECC area has wrong ECC value (0xFF) for the content (0xFFFFFFFFFFFFFFFF) in main flash. When the CCS loads the bootloader to the flash, it calculates and programs the ECC values to ECC area. The unused flash still has wrong ECC value. When CCS memory browser reads the unused flash, multiple-bits ECC error occurs and wrong data is displayed.

    When you program the key to the flash using F021 flash API, please enable the option to calculate the ECC too.

    Fapi_issueProgrammingCommand((uint32_t *)dst, (uint8_t *)src, (uint32_t) bytes,  0, 0, Fapi_AutoEccGeneration);

      

  • Thank You very much, QJ Wang