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.