Hi,
I am running VCP2 example code on TI6638 K2K EVM hardware,
Following error are seen at second run
· for the first run VCP2 running fine interrupt are generated and we getting expected results.
· at the time of second run we are getting an error message at interrupt is already used.
“ti.sysbios.family.c64p.Hwi: line 192: E_alreadyDefined: Hwi already defined: intr# 6 xdc.runtime.Error.raise: terminating execution”
· Interrupts are cleared after the ISR is called and also EDMA interrupts are cleared, still we are getting an error message interrupt already used,
Code flow.
· Initial power on done for all the 8VCP2 instance at core ‘0’. Inside vcp2Init function
· Initialization of EDMA3 is done for all the core ‘0’ to ‘7’ inside edma3ModuleInit function.
· Configuration of VCP2 parameter done inside setupVcpTputEdma3 function.
· Configuration of interrupts and channels done inside the edma3MultChnlEnable function, four interrupts are configured, Interrupt configuration of VCP2 transmit XEVT0 number: 29 and Interrupt configuration of VCP2 receive 0_REVT0 number: 28 and also interrupt configuration of VCP2_RCV_OPPARAM_TCC_VCP0 and VCP2_XMT_IPCONFIG_TCC_VCP0 are done.
· Interrupts are enabled inside the Setup_Interrupt function, Interrupt vector ‘6’ we are using. ‘CSL_INTC_VECTID_6’ and also mapping of system interrupts to proper output interrupts (channels) enabling is done.
· Due to this error not able to proceed further. Please provide inputs if i am missing any configuration or something wrong in interrupt setup, waiting for reply.
· Code snippet below for enabling the channel and EDMA interrupts.
void edma3MultChnlEnable(Uint32 edmaRegionNum)
{
/* Interrupt Event*/
regionIntr.region = edmaRegionNum;
regionIntr.intrh= 1 << (VCP2_XMT_TCC(/*coreNum1*/edmaRegionNum)-0x20);
regionIntr.intr= 0;
CSL_edma3HwControl(hModule,CSL_EDMA3_CMD_INTR_ENABLE,®ionIntr);
CSL_edma3HwChannelControl(hEdma3VcpXevt,CSL_EDMA3_CMD_CHANNEL_ENABLE,NULL);
regionIntr.region = edmaRegionNum;
regionIntr.intrh |= 1 << (VCP2_RCV_TCC(/*coreNum1*/edmaRegionNum)-0x20);
regionIntr.intr=0;
CSL_edma3HwControl(hModule,CSL_EDMA3_CMD_INTR_ENABLE,®ionIntr);
CSL_edma3HwChannelControl(hEdma3VcpRevt,CSL_EDMA3_CMD_CHANNEL_ENABLE,NULL);
regionIntr.region = edmaRegionNum;
//regionIntr.intrh |= 1 << VCP2_RCV_OPPARAM_TCC(coreNum1);
regionIntr.intr |=1 << (VCP2_RCV_OPPARAM_TCC(/*coreNum1*/edmaRegionNum));
CSL_edma3HwControl(hModule,CSL_EDMA3_CMD_INTR_ENABLE,®ionIntr);
CSL_edma3HwChannelControl(hEdma3VcpRevt,CSL_EDMA3_CMD_CHANNEL_ENABLE,NULL);
regionIntr.region = edmaRegionNum;
//regionIntr.intrh |= 1 << VCP2_XMT_IPCONFIG_TCC(coreNum1);
regionIntr.intr |= 1 << (VCP2_XMT_IPCONFIG_TCC(/*coreNum1*/edmaRegionNum));
CSL_edma3HwControl(hModule,CSL_EDMA3_CMD_INTR_ENABLE,®ionIntr);
CSL_edma3HwChannelControl(hEdma3VcpRevt,CSL_EDMA3_CMD_CHANNEL_ENABLE,NULL);
}
· Code snippet interrupts is enabled
hCpintc = CSL_CPINTC_open(1); // handle for INTC0
CSL_CPINTC_disableAllHostInterrupt(hCpintc);
CSL_CPINTC_setNestingMode(hCpintc, CPINTC_NO_NESTING);
CSL_CPINTC_mapSystemIntrToChannel (hCpintc, CSL_CIC0_I2C_1_INT , 8);
CSL_CPINTC_clearSysInterrupt (hCpintc, CSL_CIC0_I2C_1_INT );
CSL_CPINTC_enableSysInterrupt (hCpintc, CSL_CIC0_I2C_1_INT );
Hwi_Params hwiParams;
Hwi_disable();
Hwi_disableInterrupt(CSL_INTC_VECTID_6);
Hwi_Params_init(&hwiParams);
hwiParams.enableInt = FALSE;
hwiParams.eventId = CSL_C66X_COREPAC_CIC_OUT8_PLUS_16_MUL_N ;
Hwi_create (CSL_INTC_VECTID_6, (ti_sysbios_interfaces_IHwi_FuncPtr) EDMA_ISR, &hwiParams, NULL);
Hwi_clearInterrupt (CSL_INTC_VECTID_6);
Thanks & regards,
Anil Kumar
If I am missing any configuration please provide input