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.

Safety diagnostic library error on SL_SelfTest_SRAM with uC/OS-II

Other Parts Discussed in Thread: TMS570LS1227, HALCOGEN

Hi team:

 

we are beginning to integrate into our project the safety diagnostic library ver 2.4.0. The demo project TMS570LS1227_NoOs has been built and run correctly. When we added the safety diagnostic library into our project (with uc/OS-II) , then there is an error when called:

 

retVal = SL_SelfTest_SRAM(SRAM_ECC_ERROR_FORCING_2BIT, TRUE, &failInfoTCMRAM);

 

after run instruction:

 

ramread64 = sramEccTestBuff[2];                     //line 278 in sl_selftest.c

 

the program jump to _excpt_vec_abort_data correctly, and then:

 

if (((TCRAM_RAMCTRL_ECCWREN == (sl_tcram1REG->RAMCTRL & TCRAM_RAMCTRL_ECCWREN))

||(TCRAM_RAMCTRL_ECCWREN == (sl_tcram2REG->RAMCTRL & TCRAM_RAMCTRL_ECCWREN)))

&&(TRUE == SL_FLAG_GET(SRAM_ECC_ERROR_FORCING_2BIT))){

          /* So looks like writes to ECC region is enabled, check if the error address is in the test buffer range */

                 maskDAbort = TRUE;

    };

 

but after that, program jump to this _except_vec_abort_data() in the infinite loop, nERROR pin is active low.

 

 

 

Refence uC.OS-II With ARM-Cortex-R And HALCoGen From Texas Instruments, label "Interrupts" config like this:

 

 

 

label "R4-MPU-PMU" label config like this:

Add exceptions here :

Do you have an idea about what we might have been wrong?

 

Thank you & Best Regards 


  • Hello,

    According to the ARM architecture reference manual, the return instruction from a data abort handler must make the code execute the same instruction that caused the data abort. This assumes that the data abort handler corrects the issue that caused the abort so that the instruction can be executed after the issue has been addressed.

    This is obviously not the case when a data abort is caused intentionally. Therefore HALCoGen generates a data abort handler that manipulates the return address (link register) so that code execution continues from the instruction after the one that caused the intentional data abort. Also, the abort handler must not do this for a real data abort, just for the one that is caused intentionally.

    I will review the data abort handler in the SDL to make sure that this implementation is still correctly done.

    Regards,
    Sunil
  • Hi, Sunil Oak:

      Thank you for your reply. I have sloved this problem and your reply gave me a clear understanding of "data abort"  issue.

      Thank you & Best Regards