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.

TMS320C6678: SRIO Doorbell interrupt service

Part Number: TMS320C6678

Hi,

which is the correct sequence of operation servicing the doorbell interrupt, so to be sure to not lost any event?

I'm working on a bare metal application: no operating system, no TI SRIO driver from PDK, I use only the CSL_SRIO routines .

My handler is directly invoked by the CPU interrupt and:

    CSL_SRIO_GetInterruptStatusDecode(hSrio, 16, &intStatus);
    for(int i=0; i<4; ++i)
    {
      CSL_SRIO_GetDoorbellPendingInterrupt(hSrio, i, &evn->events[i]);
      CSL_SRIO_ClearDoorbellPendingInterrupt(hSrio, i, evn->events[i]);
    }

   CSL_CPINTC_clearSysInterrupt(ci, 112);   

 CRITICAL: if a boorbell arrive between "CSL_SRIO_ClearDoorbellPendingInterrupt()" and " CSL_CPINTC_clearSysInterrupt()"  can I lost interrupts?

Shall I move the CSL_CPINTC_clearSysInterrupt() before clearing the pending doorbell interrupts, maybe at the cost of a spurious interrupt?

 

Regards

  • Hi,

    You can refer to the TI SRIO code: pdk_c667x_2_0_16\packages\ti\drv\srio\src\srio_drv.c, even you don't use it. Function Srio_dioCompletionIsr(), there are critical section enable/disable code when you checking pending doordell interrupt. 

    Regards, Eric

  • Hi,

    I already looked at the driver but I there is nothing about the interrupt controller system clear interrupt, that is something like my call to CSL_CPINTC_clearSysInterrupt() .

    I guess it is hidden somewhere in the TI RTOS and it is not so easy to discover where it is.

    It is not clear to me if the SRIO doorbell interrupt is a level interrupt or edge one:

    • level: it is ok to clear sys interrupt after clearing SRIO doorbell interrupts
    • edge: I have to first clear the sys interrupt, then clear the SRIO interrupt. 

  • Hi,

    SRIO interrupt is edge.

    Regards, Eric