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.

RM48L952: ESM Callback

Part Number: RM48L952

I'm looking for some detailed description or an example of how an application can register and use the ESM_ApplicationCallback().

For instance, when doing fault injection test, how would the application use the esm callback to complete the test? I know the ESM_ApplicationCallback() checks and determines cause of the error, but once that's done what should happen next? How are the param1, param2, param3 used?

  • Guy,

    This is entirely up to the application designer. Depending on the severity of any error in the specific application, the application can choose the system response. For example, if you get a parity error on the DMA RAM, you can choose to pass the DMA parity error address as an argument to the call back function. The application can then decide to just write and read back form this location, or to run a PBIST on the DMA RAM to check if it was a transient fault or a permanent fault that caused the parity error to be detected.

    There are multiple parameters defined to allow for flexibility in providing the required information for all the errors signaled to the ESM.

    Regards, Sunil

  • Thanks, Sunil. This is the part I need some clarity on: 

    " For example, if you get a parity error on the DMA RAM, you can choose to pass the DMA parity error address as an argument to the call back function"

    Does this mean that I call my application function from inside the callback function? I think of a callback function as one that provides a hook to make an asynchronous call back into my application function, like how an interrupt-driven or event-driven program works. However, with the esm callback function example provided, the callback function exits after setting the param1,2,3 and flag with no indication of how it hook into my application function.  

    For example, in this snippet:

    	else if((ESM_GRP2_MASK == ((grp_channel&ESM_GRP2_MASK)))&&(ESM_G2ERR_B0TCM_UNCORR == (grp_channel & 0x0000fffful)))
    	{
    		callbkParam1 = param1;
    		/* clear nError PIN and esm flags */
    		sl_esmREG->SR1[1] |= GET_ESM_BIT_NUM(ESM_G2ERR_B0TCM_UNCORR);
    		sl_esmREG->SSR2 |= GET_ESM_BIT_NUM(ESM_G2ERR_B0TCM_UNCORR);
    		_SL_HoldNClear_nError();
    		sram_radecode_diagnostics_app_callback = TRUE;
    	}

    How does my application get access to callbkParam1? Is the intent for me to make a call to my application function from within this block with something like doSomethingInApplication(callbkParam1, sram_radecode_diagnostics_app_callback) or I should be looking for some trigger/hook elsewhere?

  • Guy,

    ESM interrupt service routines can be executed based on a group1 or group2 error signaled to the ESM. A group2 error causes a high-level interrupt request, which is configured as an FIQ (non-maskable once enabled) on Hercules processors. A group1 error can generate a low/high-level interrupt based on the application's choice.

    These interrupt service routines would require any available information about the error input that generated the interrupt. This can be communicated to the ISR using the callbkParam* global variables.

    Regards, Sunil