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.

AM2434: AM2434 - R5FSS -TCM - ECC - error injection

Part Number: AM2434

Dear TI Support,

For an AM2434 MCU, I would like to periodically verify that ECC error detection is functioning reliably.

For the cache memories, the SDK example project (r5_ecc_cache_app_am243x-evm_r5fss0-0_nortos_ti-arm-clang) works as expected. However, it only tests the cache memories (RAM_ID 0–20), and the TCM memories (ATCM and BTCM) are not covered by this example.

The TCM memories also cannot be tested using the ecc_app_am243x-evm_r5fss0-0_nortos_ti-arm-clang project.

While analyzing the SDL_ECC_selfTest() API, I noticed that for TCM memories the error detection is based on the CP15 CFLR register. Is this the expected mechanism for detecting ECC errors in TCM, or should the errors instead be detected through the Event Bus? 

Is there currently any example project that demonstrates how to inject and detect ECC errors in the TCM memories?

Could you also clarify what the recommended procedure is for ECC error injection and detection in TCM memories?

What is the recommended procedure for clearing an ECC error and repeating the error injection?

For example, the SDL_ECC_selfTest() API appears to work only once. After the first execution, it is no longer possible to inject another ECC error into the same TCM memory.

From my investigation, the API does not clear the CP15 CFLR register. Even if I manually clear the CFLR register, I still cannot inject another ECC error.

Could you please clarify the correct sequence of steps required to:

  • clear the previous ECC error,
  • reset the ECC error status, and
  • perform another ECC error injection on the TCM memory?

Is there any additional register, cache/TCM maintenance operation, or CPU reset sequence that must be performed before another ECC self-test can be executed?

SDK version(s) used:

mcu_plus_sdk_am243x_08_06_00_43__all
mcu_plus_sdk_am243x_11_00_00 - this is the currently used
mcu_plus_sdk_am243x_12_00_00_27

Thank you for your assistance.

Best regards,
Balázs Hegyi

  • Hi,

    Is this the expected mechanism for detecting ECC errors in TCM, or should the errors instead be detected through the Event Bus? 

    Yes, ECC for both TCMs and Cache memories R5F maintains the ECC mechanism. 

    Is there currently any example project that demonstrates how to inject and detect ECC errors in the TCM memories?

    Currently there's no example for AM243x. It's being planned for the next release. However, we have reference example in AM62Ax. You can use that as a reference for AM243x.

    https://github.com/TexasInstruments/mcupsdk-core-k3/tree/k3_next/examples/sdl/ecc_tcm/am62ax-sk/mcu-r5fss0-0_nortos

    Since it's the R5F core is the same, the code should be very similar.

    Regards,

    Nihar Potturu

  • Hello Nihar Potturu,

    Thank you for your quick response. I apologize, as my question was not entirely clear, and therefore the answer was not completely clear to me either.

    Am I correct in understanding that TCM and cache errors are only available via the Cortex-R5F internal error/status registers and are not exported to the event bus? 

     I am checking the example

    Many thanks
    Balázs Hegyi

  • Hi,

    Am I correct in understanding that TCM and cache errors are only available via the Cortex-R5F internal error/status registers and are not exported to the event bus? 

    You are partially correct. The errors are reported by R5F core directly, but they are also routed to the SoC ESM. The TCM errors would be reported through the same ESM event as the R5F Cache memories. 

    Regards,

    Nihar Potturu

  •  I am checking the example

    I am attaching the example that will be added in the next release for AM243x below. You can take a look at that instead.

    ecc_tcm.zip

    Regards,

    Nihar Potturu

  • Thank you for sending the example code. I ran it, and the example works as expected. However, I am still experiencing an issue when trying to perform repetitive ECC testing.

    I am unable to trigger the error again. This issue is also reproducible with the example code you provided after making the following modification:

    int32_t ECC_funcTest(void)
    {
        int32_t testResult;
    
        testResult = ECC_Example_init();
    
        if (testResult != SDL_APP_TEST_PASS)
        {
            DebugP_log("\r\nECC Safety Example tests: unsuccessful\r\n");
            return SDL_EFAIL;
        }
    
        testResult = ECC_sdlFuncTest();
    
        if (testResult == SDL_APP_TEST_PASS)
        {
            DebugP_log("\r\nECC Test Round 1 completed successfully. \r\n");
            testResult = ECC_sdlFuncTest();
        }
    
        return (testResult);
    }


    Log output:

    ECC TCM Example Application
    
    ECC_Example_init: Initializing MAIN ESM.
    
    ECC_Example_init: Init MAIN ESM complete 
    
    
     AGGR ECC Init complete 
    
    ECC Safety Example tests: starting
    
     B0TCM0 Bank0 Double bit error inject test: starting
     B0TCM0 Bank0 Double bit error inject test: pErrMem 0x41010000 fixed location once test complete
    Waiting for ESM Interrupt
    
    UC-1: Got High priority ESM Interrupt 
    
    B0TCM0 Bank0 Single bit error inject test: starting
    
    B0TCM0 Bank0 Single bit error inject test: at pErrMem 0x41010000: fixed location once test complete
    Waiting for ESM Interrupt
    
    UC-2: Got Low priority ESM Interrupt
    
    ECC Safety Example tests: success
    
    ECC Test Round 1 completed successfully. 
    
    ECC Safety Example tests: starting
    
     B0TCM0 Bank0 Double bit error inject test: starting
     B0TCM0 Bank0 Double bit error inject test: pErrMem 0x41010000 fixed location once test complete
    Waiting for ESM Interrupt
    
    ESM_ECC_Example_run: UC-1 has failed...
    
    ECC Safety Example tests: failed
    
    ECC UC-1 and UC-2 Test
    
    Some tests have failed. 

    My question is: how can the ECC error be triggered again?

    Many thanks
    Balázs Hegyi

  • One additional observation: the dual-bit error test can be repeated consecutively any number of times without any issues. However, once the single-bit error test has been executed, neither the dual-bit nor the single-bit error test can be run again.

  • Hi,

    Apologies for the delay here. 

    One additional observation: the dual-bit error test can be repeated consecutively any number of times without any issues. However, once the single-bit error test has been executed, neither the dual-bit nor the single-bit error test can be run again.

    This is an expected behaviour. This is a limitation of R5F core. Once an SEC error occurs at a particular address, unless another error is injected at a different address, any subsequent errors at the initial address will not be reported. Attaching screenshot from ARM documentation below:

    My question is: how can the ECC error be triggered again?

    It should be sufficient to perform the error injection test once. Any reason for trying to execute it multiple times?

    Regards,

    Nihar Potturu

  • We are required to periodically verify the reliable operation of ECC error detection. Therefore, I am considering periodic ECC error injection.

    Is there an officially recommended alternative method for confirming that ECC error detection is operating correctly?


  • Hi,

    You can have two different addresses for error injection tests and alternate between them every time so that the issue is not seen. 

    Regards,

    Nihar Potturu