本来的程序没有使用BIOS。由于要在程序中加入网络模块NDK,没办法只好使用了BIOS,问题来了。原来响应的很好的EDMA传输中断和GPIO中断,现在都响应不了了。
在BIOS中静态设置了HWI模块,设好interrupt section number,钩上dispatcher,添加上ISR函数。GPIO的中断可以响应了。EDMA传输完成中断仍然响应不了。EDMA的中断设置需要如下代码:
/***************** interrupt configration for EDMA completed ***************/
//设置中断5为传输完成中断
vectId = CSL_INTC_VECTID_6;
hIntcEdma = CSL_intcOpen (&intcObjEdma, CSL_INTC_EVENTID_EDMA3CC_INT0, &vectId , NULL);
/* Association of an EDMA event handler with the INTC routine */
EventRecord_EDMA.handler = &eventEdmaHandler;
EventRecord_EDMA.arg = (void*)(Edma3_hModule);
CSL_intcPlugEventHandler(hIntcEdma, &EventRecord_EDMA);
/* Enabling event edma */
CSL_intcHwControl(hIntcEdma, CSL_INTC_CMD_EVTENABLE,NULL);
/* Hook up the EDMA event with an completion code function handler */
EdmaEventHook(tranIntTcc, EDMACompleted_INT);
/* Enable interrupts */
regionIntr.region = CSL_EDMA3_REGION_0 ;
regionIntr.intr |= 1<<tranIntTcc ;
regionIntr.intrh = 0x0 ;
CSL_edma3HwControl(Edma3_hModule, CSL_EDMA3_CMD_INTR_ENABLE, ®ionIntr);
// printf("enable over;");
/***************** interrupt configration for EDMA completed ***************/
响应的应该是eventEdmaHandler这个函数,改使能的都使能了,大家帮忙看下到底是什么问题啊
|
|