阅读:992回复:3
pci设备驱动程序的问题
我们一用户使用windriver驱动程序开发pci设备,为什么一产生中断
计算机就重新复位了?是什么原因,高手指点一下. |
|
沙发#
发布于:2003-08-07 17:40
奇怪。
驱动不安装会不会有问题呢? 产生中断后都做了什么?电源有波动吗? |
|
|
板凳#
发布于:2003-08-07 18:21
不安装中断服务程序没有问题。
中断服务程序已经清中断了,可能是没有进入中断服务程序,一直产生中断,导致系统复位。 这是中断挂接程序,由windriver产生的 //Enable mpeg interrupt if ( MPEG_IntIsEnabled(hMPEG) ) { MPEG_IntDisable(hMPEG); }else{ if ( !MPEG_IntEnable(hMPEG, AVE2KLIB_InterruptMpegHandlerRoutine) ) goto exit1; } 这是中断服务程序: void AVE2KLIB_InterruptMpegHandlerRoutine(MPEG_HANDLE hMPEG, MPEG_INT_RESULT *intResult) { int i; MPEG_SHARE* pstCurMpegShare= (MPEG_SHARE*)hMPEG->pMpegShare; MPEG_WriteDword(hMPEG,MPEG_AD_BAR0,0x4,0x2); // 清中断 return ; } 中断服务程序只是做了清中断一件事 |
|
地板#
发布于:2003-08-08 02:37
try not to execute the write operation and see how
//MPEG_WriteDword(hMPEG,MPEG_AD_BAR0,0x4,0x2); if the system is ok without execute this MPEG_WriteDword() that means your hardware is doing something wrong when you write something into it. |
|