| 
 
| 本帖最后由 jiangwenj02 于 2015-12-23 22:16 编辑 
 目前正在调试SRIO doorbell中断程序,slave断已经能够正常接收到doorbell信息,并且相应的标志位也已经有了响应。但是slave端就是不进中断程序,接下来也不知道怎么去调试。
 程序是触发INTDST0中断。接收到信号之后INTDST0_DECODE中的最后一位也被置为了1。大神指点一下该怎么去调试吧。不知道接下去怎么去做了。还有就是INTDST0_RATE_CNTL这个寄存器到底是什么意思啊。看半天文档都看不明白。
 中断设置程序如下:
 void initInt()
 {
 
 CSL_IntcContext             intcContext;
 CSL_IntcGlobalEnableState   state;
 CSL_IntcEventHandlerRecord  EventRecord;
 CSL_IntcParam               vectId;
 CSL_Status                                        status;
 CSL_IntcObj                 SrioIntcObj;
 CSL_IntcHandle              SrioIntcHandle;
 CSL_IntcEventHandlerRecord  record[11];
 
 RIO_DOORBELL0_ICCR = 0xffffffff;
 RIO_DOORBELL1_ICCR = 0xffffffff;
 RIO_DOORBELL2_ICCR = 0xffffffff;
 RIO_DOORBELL3_ICCR = 0xffffffff;
 DSP_EVTCLR0 = 0xffffffff;
 DSP_EVTCLR1 = 0xffffffff;
 DSP_EVTCLR2 = 0xffffffff;
 DSP_EVTCLR3 = 0xffffffff;
 
 intcContext.eventhandlerRecord = record;
 intcContext.numEvtEntries      = 11;
 status = CSL_intcInit(&intcContext);
 if (status != CSL_SOK) {
 printf("Intc initialization failed\n");
 return;
 }
 
 /* Enable NMIs */
 status = CSL_intcGlobalNmiEnable();
 if (status != CSL_SOK) {
 printf("Intc global NMI enable failed\n");
 return;
 }
 
 /* Enable global interrupts */
 status = CSL_intcGlobalEnable(&state);
 if (status != CSL_SOK) {
 printf ("Intc global enable failed\n");
 return;
 }
 
 /* Opening intc module */
 vectId = CSL_INTC_VECTID_8;
 SrioIntcHandle = CSL_intcOpen (&SrioIntcObj, CSL_INTC_EVENTID_RIOINT0, \
 &vectId , NULL);
 
 if (SrioIntcHandle == NULL) {
 printf("Intc open failed\n");
 return;
 }
 
 EventRecord.handler = (CSL_IntcEventHandler)&eventSrioHandler;
 EventRecord.arg = (void*)(SrioIntcHandle);
 status = CSL_intcPlugEventHandler(SrioIntcHandle,&EventRecord);
 
 if (status != CSL_SOK) {
 printf("Intc plug event handler failed\n");
 return;
 }
 
 CSL_intcHwControl(SrioIntcHandle, CSL_INTC_CMD_EVTCLEAR, NULL);
 CSL_intcHwControl(SrioIntcHandle, CSL_INTC_CMD_EVTENABLE, NULL);
 
 
 }
 
 | 
 |