Hi 你好!
请教一个问题:我使用TI的C6657 EVM板,软件是CCS5.4. 现在在测试双核通过IPC进行通信;单跑IPC可以成功, 跑IPC+NDK也可以成功;
但是在core0加上MCBSP模块后出现冲突,当然MCBSP在没有IPC的情况下是能够正确运行的;
core0 卡死在 ti_sysbios_family_c64p_Hwi_int8里面,一直不停进入这个中断程序,导致线程卡死。
请问这可能是什么问题?
谢谢!
Andy Yin1:
是否存在HWI中断矢量的重复定义冲突呢,可以看一下HWI8是跟哪个事件对应的以确认为何一直进中断的原因。
James zhou:
回复 Andy Yin1:
Hi Andy,
谢谢答复!
我是将C6657的McBSP和IPC这2个sample合起来。想使用core0调用McBSP,然后将数据传给core1.
在调用edma3init结束的时候,调用了函数registerEdma3Interrupts(edma3Id);返回时候就一直进hwi
/** To Register the ISRs with the underlying OS, if required */void registerEdma3Interrupts (unsigned int edma3Id) { static UInt32 cookie = 0; Int eventId = 0; /* GEM event id */ unsigned int numTc = 0; /* Disabling the global interrupts */ cookie = Hwi_disable(); /* Transfer completion ISR */ CpIntc_dispatchPlug(ccXferCompInt[edma3Id][dsp_num], lisrEdma3ComplHandler0, edma3Id, TRUE); CpIntc_mapSysIntToHostInt(0, ccXferCompInt[edma3Id][dsp_num], ccXferHostInt[edma3Id][dsp_num]); CpIntc_enableHostInt(0, ccXferHostInt[edma3Id][dsp_num]); eventId = CpIntc_getEventId(ccXferHostInt[edma3Id][dsp_num]); EventCombiner_dispatchPlug (eventId, CpIntc_dispatch, ccXferHostInt[edma3Id][dsp_num], TRUE); EventCombiner_enableEvent(eventId); /* CC Error ISR */ CpIntc_dispatchPlug(ccErrorInt[edma3Id], lisrEdma3CCErrHandler0, edma3Id, TRUE); CpIntc_mapSysIntToHostInt(0, ccErrorInt[edma3Id], edma3ErrHostInt[edma3Id][dsp_num]); /* TC Error ISR */ while (numTc < numEdma3Tc[edma3Id]) { CpIntc_dispatchPlug(tcErrorInt[edma3Id][numTc], (CpIntc_FuncPtr )(ptrEdma3TcIsrHandler[numTc]), edma3Id, TRUE); CpIntc_mapSysIntToHostInt(0, tcErrorInt[edma3Id][numTc], edma3ErrHostInt[edma3Id][dsp_num]); numTc++; } /* Enable the host interrupt which is common for both CC and TC error */ CpIntc_enableHostInt(0, edma3ErrHostInt[edma3Id][dsp_num]); eventId = CpIntc_getEventId(edma3ErrHostInt[edma3Id][dsp_num]); EventCombiner_dispatchPlug (eventId, CpIntc_dispatch, edma3ErrHostInt[edma3Id][dsp_num], TRUE); EventCombiner_enableEvent(eventId); Hwi_enableInterrupt(hwiInterrupt); /* enable the 'global' switch */ CpIntc_enableAllHostInts(0); /* Restore interrupts */ Hwi_restore(cookie); }
其中:unsigned int ccXferHostInt[1][2] = { {0u, 20u}, };
unsigned int ccXferCompInt[NUM_EDMA3_INSTANCES][EDMA3_MAX_REGIONS] = { { 24u, 25u, 26u, 27u, 28u, 29u, 30u, 31u, }, };