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.

TMS570LC4357: Could not read the actual written value due to generating ECC error in flash

Part Number: TMS570LC4357

Hello ti,

I’m flashing some area of the Flash region with the values(EBEBEBEB). But there its generating ECC error also in Flash.

Now I need to read the area with actual value. But I could not. Because after flashing(for example, the values are E3EBEBE9).

Could you help me in this?

Thanks!!

BR,

Vigneshwar.

  • Hello BR,

    For TMS570LC43x, the ECC is enabled automatically and can not be disabled. When erasing the flash, the memory for flash ECC area is also erased: the ECC value of the data (0xFFFFFFFF) is 0xFF which is not correct.

    How many bytes are programmed to your flash? How do you read the data back, from CCS memory browser or using flash API?
  • Hello QJ Wang,

    Thanks for your response.

    Yes. I came to know that the ECC is enabled automatically and can not be disabled. I'm programming the pFlash with 256 Bytes. And I'm reading the data back using Flash API.

    This is the Flash API which I was using, Fapi_issueProgrammingCommand((uint32_t *)uAddr, (uint8_t *)aubData, uwPageSizeByte, NULL_PTR, NULL, Fapi_DataOnly).

    I modified the API, Fapi_issueProgrammingCommand((uint32_t *)uAddr, (uint8_t *)aubData, uwPageSizeByte, NULL_PTR, NULL, Fapi_AutoEccGeneration).

    And Now it's working fine.

    Thanks for your support!!

    Best Regards,

    Vigneshwar.

  • Hello QJ Wang,

    If i'm erasing a particular memory location with erased value as (0xFFFFFFFF).
    Note that I'm using Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector, sector_address); and I don't have option like selecting the mode(such as AutoEccGeneration) in parameter as do for programming using Fapi_issueProgrammingCommand((uint32_t *)uAddr, (uint8_t *)aubData, uwPageSizeByte, NULL_PTR, NULL, Fapi_AutoEccGeneration);

    Now, If I read the Erased value, it is read with Ecc. And once I compare with erased value, it causes an Exception.
    Usually it makes no sense when we erase and read. But in this case w.r.t TMS570LC4357, I doing this check and don't have any solution.
    So, How it could be solved?

    Thanks!!

    Best regards,
    Vigneshwar