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.

TMS570LS3137: Enabling the Core Flash ECC

Part Number: TMS570LS3137
Other Parts Discussed in Thread: HALCOGEN

I am trying to enable the Flash ECC protection in my application, but the call to coreEnableFlashECC early in the initialization causes my application to produce undefined-instruction exceptions later on during run-time. I found the test code from the Hercules Safety demo (ATCM_Correctable_Error) that tests Flash ECC using a specific OTP memory location, and I was surprised that the end of that function called _coreDisableFlashECC_() -- should an application using Flash ECC have that core Flash ECC always enabled (I assume I would never call this _coreDisableFlashECC)? In other words, shouldn't this FlashECC-test function leave FlashECC enabled?

I have not been able to isolate where my application is failing, because it appears to be executing invalid instructions (and if I don't call _coreEnableFlashECC then all is well). Is there sample code that enables FlashECC, checks that it works, and leaves it enabled?

Note I have Auto-ECC-Generation and Align-program-segments-to-64-bit-regions enabled in my project settings.

Thanks,

Jim

  • HelloJim,

    The demo SW generates ECC error by reading the 0xF00803F4 in OTP. Deliberate single bit and double bit errors have been placed in the OTP for checking the ECC functionality. In the demo code, the flash ECC is only enabled for testing in ATCM_Correctable_Error().

    In HALCoGen generated sys_selftest.c, fmcECCcheck(void) is used to test ECC by reading the deliberate ECC error and flashECC is always enabled. Your code may have ECC error, and the enabling the flash ECC is not the root cause of the prefetch error.
  • Thanks QJ; I found the issue.
    Jim