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.

How can I handle SRIO Tx interrupt

Other Parts Discussed in Thread: TMS320C6670, SYSBIOS

I use C6670 TI DSP.(TMS320C6670?)

I ported SRIO driver into my evaluation board.

It works using SRIO DIO transfer with external SRIO device.

But, I can not enable SRIO Tx done interrupt.

Please, help me.

1. I defined interrupt handler.

=====================================

void BSP_Srio_Tx_Done_Isr(UArg argument)
{
System_printf("[SRIO INT]Tx done. handle: 0x%x", ghSrioCSL);

Srio_dioTxCompletionIsr((Srio_DrvHandle)argument, ghSrioCSL);
}

=====================================

2. I ported following code to enable Tx interrupt.(it is from example project in PDK6670)

=====================================

ghSrioCSL = CSL_SRIO_Open (0);
if (ghSrioCSL == NULL)
return -1;

/* SRIO DIO Interrupts need to be routed from the CPINTC0 to GEM Event.
* - We have configured DIO Interrupts to get routed to Interrupt Destination 0
* (Refer to the CSL_SRIO_RouteLSUInterrupts API configuration in the SRIO Initialization)
* - We want this System Interrupt to mapped to Host Interrupt 8 */

/* Disable Interrupt Pacing for INTDST0 */
CSL_SRIO_DisableInterruptPacing (ghSrioCSL, 0);

/* Route LSU0 ICR0 to INTDST0 */
CSL_SRIO_RouteLSUInterrupts (ghSrioCSL, 0, 0);

/* Route LSU0 ICR1 to INTDST0 */
CSL_SRIO_RouteLSUInterrupts (ghSrioCSL, 1, 0);

/* Route LSU0 ICR2 to INTDST0 */
CSL_SRIO_RouteLSUInterrupts (ghSrioCSL, 2, 0);

/* Map the System Interrupt i.e. the Interrupt Destination 0 interrupt to the DIO ISR Handler. */
CpIntc_dispatchPlug(CSL_INTC0_INTDST0, (CpIntc_FuncPtr)BSP_Srio_Tx_Done_Isr, (UArg)hDrvManagedSrioDrv, TRUE);

/* The configuration is for CPINTC0. We map system interrupt 112 to Host Interrupt 8. */
CpIntc_mapSysIntToHostInt(0, CSL_INTC0_INTDST0, 8);

/* Enable the Host Interrupt. */
CpIntc_enableHostInt(0, 8);

/* Enable the System Interrupt */
CpIntc_enableSysInt(0, CSL_INTC0_INTDST0);

/* Get the event id associated with the host interrupt. */
eventId = CpIntc_getEventId(8);

/* Plug the CPINTC Dispatcher. */
EventCombiner_dispatchPlug (eventId, CpIntc_dispatch, 8, TRUE);

=====================================

Thank you.

  • What version of SYSBIOS, CCS are you using?

    I'm familiar with SYSBIOS and not so much with SRIO.  I may have this thread move to the multicore C66 forum if its a SRIO specific issue, but lets first make sure you've got your interrupts plugged correctly with the right events.

    Can you let me know what CPU interrupt you have plugged?

    Also, what is the eventId you are plugging in the EventCombiner_dispatchPlug() function?

    Judah

  • Thank you for your reply.

    I'm using CCSv5.5.0.00077 and SYSBIOS v6.37.2.27

    The eventID is 74.

    I just wrote for interrupt:

     =============

    CpIntc_dispatchPlug(CSL_INTC0_INTDST0, (CpIntc_FuncPtr)BSP_Srio_Tx_Done_Isr, (UArg)hDrvManagedSrioDrv, TRUE);

    CpIntc_mapSysIntToHostInt(0, CSL_INTC0_INTDST0, 8);

    CpIntc_enableHostInt(0, 8);

    CpIntc_enableSysInt(0, CSL_INTC0_INTDST0);

    eventId = CpIntc_getEventId(8);

    EventCombiner_dispatchPlug (eventId, CpIntc_dispatch, 8, TRUE);

    ===========

  • Hi,

    I think LSU interrupt is getting triggered at the SRIO peripheral, but it is not be handled correctly at the CIC0 or at the CorePAC0 INTC. Please, try to cross check the interrupt setup part of your project with the interrupt setup part of SRIO_LoopbackDioIsrexampleproject.

    You can also check the CIC0 system event status register and the input event status at the corePAC0 INTC. Please, refer to the CIC users guide and the C66x CorePAC users guide for details about the event status registers.

    Thanks,

  • First, just a question but don't you need the '&' in front of CpIntc_dispatch like the statement below?

    EventCombiner_dispatchPlug (eventId, &CpIntc_dispatch, 8, TRUE);

    Aside from that, What core pac interrupt are you using for the combined events?

    Are you doing a Hwi_create() anywhere?  I need the one associated with the code above.

    Judah