如题,MPC860,IRQ6使用边沿触发时,一切正常,一旦使用电平触发,则在中断触发后系统失去响应,代码如下,请各位看下哪里存在问题。
边沿触发:
void IntrInitIRQ6()
{
int key;
*(vUint16T *)(IIIR+0x018)|=(0x0008);
key = intLock();
intConnect((VOIDFUNCPTR *)IV_IRQ6,(VOIDFUNCPTR) InitiRQ6Test,0);
intEnable((VOIDFUNCPTR *)IV_IRQ6);
intUnlock(key);
}
void InitiRQ6Test()
{
*(vUint16T *)(IIIR+0x010)|=(0x0008);
logMsg("interrupt!\r\n");
}
电平触发
void InitiRQ6Test()
{
*(vUint16T *)(IIIR+0x010)|=(0x0004);
logMsg("interrupt!\r\n");
}
void IntrInitIRQ6()
{
int key;
*(vUint16T *)(IIIR+0x018)&=(~0x0008);
key = intLock();
intConnect((VOIDFUNCPTR *)IV_IRQ6,(VOIDFUNCPTR) InitiRQ6Test,0);
intEnable((VOIDFUNCPTR *)IV_IRQ6);
intUnlock(key);
}