|
我在oal层OEMInterruptHandler函数中定义
else if(ulVic2Irq & INT2_GPIO)
{
gpioAIntrState=*GPIO_INTSTATUSA;
if(gpioAIntrState & 0x40)
{
*GPIO_AEOI=0x40;//CANINTTER_GPIO;
RETAILMSG(1,(TEXT("*---*startsysintr CANhhhhhhhhhhhhhhhhhhhhhhhhhhhhh\r\n")));
}
*VIC2_INTCLEAR = INT2_GPIO;
retval=SYSINTR_CAN;
}
而且我产生中断的时候也执行了RETAILMSG(1,(TEXT("*---*startsysintr CANhhhhhhhhhhhhhhhhhhhhhhhhhhhhh\r\n")));
说明isr已经返回了系统中断号SYSINTR_CAN;
我在驱动中定义
pCanInfo->hInterEvent=CreateEvent(0,FALSE,FALSE,NULL);
if(!pCanInfo->hInterEvent)
{
RETAILMSG(1,(TEXT("CAN:CreateEvent_Faileaaaaaaaaaaaaaaaaaaaa")));
}
if(!InterruptInitialize(SYSINTR_CAN,pCanInfo->hInterEvent,NULL,0))
{
RETAILMSG(1,(TEXT("InterruptInitialize Failed!!hhhhhhhhhhhhhhhhhhhhhhhhhh\n")));
}
pCanInfo->hInterThread=CreateThread(NULL,
0,
CanIST,
pCanInfo,
CREATE_SUSPENDED,
0);
if(!pCanInfo->hInterThread)
{
RETAILMSG(1,(TEXT("CANTHREAT:CREATETHREAD_FALSEhhhhhhhhhhhhhhhhhhhhhhhhhh\n")));
return 0;
}
dwISTPriority=100;//250;
if(!CeSetThreadPriority(pCanInfo->hInterThread,dwISTPriority))
{
RETAILMSG(1,(TEXT("CeSetThreadPriority Failed!!hhhhhhhhhhhhhhhhhhhhhhhhhh\n")));
}
我在ist中WaitForSingleObject(pCanInfoIST->hInterEvent,INFINITE);
产生中断后驱动中却没有反应,请问这是为什么啊?
我觉得这些设置的没错啊,请兄弟们帮忙了。
|
|