Tool/software: Code Composer Studio
Hi,
I am working on some project use C6657 dsp. I want to use the timer and emac interrupt by setting interrupt controller. Now, the timer is work fine, and can work continuously. but my event handler not be invoked. Code is followed.
CSL_IntcParam param; CSL_Status status; CSL_IntcContext context; CSL_IntcEventHandlerRecord evt_record[5]; context.numEvtEntries = 5; context.eventhandlerRecord = evt_record;
// initial Intc status = CSL_intcInit(&context); if (status != CSL_SOK) printf("CSL Interrupt initial error! code: %d\n", status);
// CSL_intcGlobalNmiEnable(); CSL_intcGlobalEnable(NULL);
// set timer2 event to cpu interrupt vector 4 param = CSL_INTC_VECTID_4; CSL_intcOpen(&timer2_intc, CSL_GEM_TINT2L, ¶m, &status); if (status != CSL_SOK) printf("Interrupt timer2 open error! code: %d\n", status);
// set event handler evtrecord.arg = NULL; evtrecord.handler = (CSL_IntcEventHandler)&timer2_isr; status = CSL_intcPlugEventHandler(&timer2_intc, &evtrecord); if (status != CSL_SOK) printf("Interrupt timer2 hook to int function error! code: %d\n", status);
// enable event interrupt CSL_intcHwControl(&timer2_intc, CSL_INTC_CMD_EVTENABLE, NULL);
I dont know where cause the problem. Anyone can help? By the way, my project request to use the CSL library to accomplish this function.
CCS version : 5.2.1.00018
pdk version : pdk_C6657_1_1_1_4
MCSDK version : BIOS-MCSDK_2.1.1.4
Thanks.