Other Parts Discussed in Thread: SYSBIOS
Hi team,
I wanna configure eight cores with eight edma channels, respectively. Then, I need configure eight edma channels with diffrent interrupt events to respond its core.
I referenced the file "Configuring Interrupts on Keystone Devices" and add those codes, but I found that the eventId get from the function CpIntc_getEventId() is -1 and the console window put those information below.
How can I figure out this problem?

void CpIntcInit( Int vector_id, UInt instNum, UInt event_id, UInt host_id, CpIntc_FuncPtr Isr)
{
Int eventId;
Hwi_Params params;
/* Map the System Interrupt i.e. the Interrupt Destination 0 interrupt to the DIO ISR Handler. */
CpIntc_dispatchPlug(event_id, (CpIntc_FuncPtr)Isr, NULL, TRUE);
/* The configuration is for CPINTC0. We map system interrupt 112 to Host Interrupt 8. */
CpIntc_mapSysIntToHostInt(instNum, event_id, host_id);
/* Enable the Host Interrupt. */
CpIntc_enableHostInt(instNum, host_id);
/* Enable the System Interrupt */
CpIntc_enableSysInt(instNum, event_id);
/* Get the event id associated with the host interrupt. */
eventId = CpIntc_getEventId(host_id);
Hwi_Params_init(¶ms);
/* Host interrupt value*/
params.arg = event_id;
/* Event id for your host interrupt */
params.eventId = eventId;
/* Enable the Hwi */
params.enableInt = TRUE;
/* This plugs the interrupt vector 4 and the ISR function. */
/* When using CpIntc, you must plug the Hwi fxn with CpIntc_dispatch */
/* so it knows how to process the CpIntc interrupts.*/
Hwi_create(vector_id, &CpIntc_dispatch, ¶ms, NULL);
}
void edma_interrupt_config(){
int instNum=0;
if(DNUM>=4)
instNum =1;
switch (DNUM) {
case 0:
edma_event_id =38;
edma_host_id = 21;
break;
case 1:
edma_event_id =39;
edma_host_id =22;
break;
case 2:
edma_event_id =10;
edma_host_id =23;
break;
case 3:
edma_event_id =11;
edma_host_id = 24;
break;
case 4:
edma_event_id =12;
edma_host_id =21;
break;
case 5:
edma_event_id =13;
edma_host_id =22;
break;
case 6:
edma_event_id =30;
edma_host_id =23;
break;
case 7:
edma_event_id =31;
edma_host_id =24;
break;
}
CpIntcInit(CSL_INTC_VECTID_6, instNum, edma_event_id, edma_host_id, (CpIntc_FuncPtr)&edma_isr);
}
Regards
Zahir Wang

