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.

TMS570LS0432: esmInit or SL_ESM_Init(ESM_Applica..) problem

Part Number: TMS570LS0432
Other Parts Discussed in Thread: HALCOGEN

Hello

 Team

 I use the library demo. In the startup.c  ,which the code is

esmInit();
/* initialize copy table */
__TI_auto_init();

SL_ESM_Init(ESM_ApplicationCallback);

A few days ago, the ECCbit failure of my setting has not been interrupted, and it is found that  the problem is ,if I cancel the SL_ESM_Init(ESM_ApplicationCallback);

that the interrupt function is normal. but the demo have the SL_ESM_Init(ESM_ApplicationCallback);

 I want to know Why did he not interrupt it? Should I cancel or change SL_ESM_Init code?

  • Hello Whong,

    If SL_ESM_Init() is not called, the esmHighInterrupt(void) is the ESM interrupt ISR. This is defined in vimInit().

    After SL_ESM_Init() is called, the ESM interrupt ISR is re-defined as sl_esm_high_intr_handler() which is located in sl_esm.c

    Please add a breakpoint in sl_esm_high_intr_handler() or in the callback function  ESM_ApplicationCallback() to monitor if the interrupt is generated by 1-bit ECC error.

  • Thank you

     Yes ,If I use the SL_ESM_Init(),the program go into the  ESM_ApplicationCallback()

    and go into  here 

    else if((ESM_GRP1_MASK == ((grp_channel&ESM_GRP1_MASK)))&&(ESM_G1ERR_B0TCM_CORRERR == (grp_channel & 0x0000ffff)))
    {
    callbkParam1 = param1;
    /* clear nError PIN and esm flags */
    sl_esmREG->SR1[0] |= GET_ESM_BIT_NUM(ESM_G1ERR_B0TCM_CORRERR);
    BIT_SET(sl_tcram1REG->RAMERRSTATUS,TCRAM_RAMERRSTATUS_ADDR_SERR);/* Clear for subsequent operation */
    BIT_SET(sl_tcram2REG->RAMERRSTATUS,TCRAM_RAMERRSTATUS_ADDR_SERR);
    _SL_HoldNClear_nError();
    sram_1bit_prof_faultinject_callback = TRUE;
    }

    But  the library 2.4 code  dont have the Infinite loop,I think it should be added it 

  • What are the benefits of safety library2.4? Compared with the automatic generation of HCG software

  • Hi Whong,

    HALCoGen was developed before SafeTI diagnostics library hence there are few overlapping Safety Diagnostics features between them. We strongly recommend to use SafeTI Diagnostics library for Safety Functions.

  • Hello

     Yes ,If I use the SL_ESM_Init(),the program go into the  ESM_ApplicationCallback()

    and go into  here 

    else if((ESM_GRP1_MASK == ((grp_channel&ESM_GRP1_MASK)))&&(ESM_G1ERR_B0TCM_CORRERR == (grp_channel & 0x0000ffff)))
    {
    callbkParam1 = param1;
    /* clear nError PIN and esm flags */
    sl_esmREG->SR1[0] |= GET_ESM_BIT_NUM(ESM_G1ERR_B0TCM_CORRERR);
    BIT_SET(sl_tcram1REG->RAMERRSTATUS,TCRAM_RAMERRSTATUS_ADDR_SERR);/* Clear for subsequent operation */
    BIT_SET(sl_tcram2REG->RAMERRSTATUS,TCRAM_RAMERRSTATUS_ADDR_SERR);
    _SL_HoldNClear_nError();
    sram_1bit_prof_faultinject_callback = TRUE;
    }

    Should I add an infinite loop,in that  code.

  • Hi Whong,

    If 2-bit ECC detected, data abort is generated, and custom_abort_handler should be called if the 2-bit ECC error is not caused by selftest. 

    For 1-bit ECC error, the SRAM data is corrected and restored to SRAM. An infinite loop is not required here. 

  • Thank you