int status; // Interrupt controller initialisation IntcConfig = XScuGic_LookupConfig(DeviceId); status = XScuGic_CfgInitialize(&INTCInst, IntcConfig, IntcConfig->CpuBaseAddress); if(status != XST_SUCCESS) return XST_FAILURE; // Call to interrupt setup Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_...
status= XScuGic_CfgInitialize(&INTCInst, IntcConfig, IntcConfig->CpuBaseAddress);if(status !=XST_SUCCESS) return XST_FAILURE;//Call to interrupt setupXil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_INT, (Xil_ExceptionHandler)XScuGic_InterruptHandler,&INTCInst); Xil_ExceptionEnable();//Connect SW1~SW...
/include/ "system-conf.dtsi" / { irq: irq@0{ compatible = "plpsirq"; interrupt-parent = <&intc>; interrupts = <0 54 1>; }; }; 需要在设备树中增加相应的中断,上一级中断是intc,中断号需要查手册,第11个中断号(本文使用)是86,减去32(前面其他功能的中断),是54, 1表示的是中断触发形式,...
(Xil_ExceptionHandler)PLIRQIntrHandler, (void*)1);if(status != XST_SUCCESS)returnXST_FAILURE ;//***/// 参考IntcTypeSetup(&INTCInst, INTC_PL_INTERRUPT_ID, INT_TYPE_RISING_EDGE);//重要IntcTypeEnable(&INTCInst, INTC_PL_INTERRUPT_ID, INT_TYPE_MASK);//***//XScuGic_Enable(&INTCInst, ...
/include/"system-conf.dtsi"/{irq:irq@0{compatible="plpsirq";interrupt-parent=<&intc>;interrupts=<0541>;};}; 需要在设备树中增加相应的中断,上一级中断是intc,中断号需要查手册,第11个中断号(本文使用)是86,减去32(前面其他功能的中断),是54, 1表示的是中断触发形式,上升沿触发 ...
// Connect SW2 interrupt to handlerstatus=XScuGic_Connect(&INTCInst,XPAR_FABRIC_PL_IRQ2_INTR,(Xil_ExceptionHandler)SW2_intr_Handler,(void*)1);if(status!=XST_SUCCESS)returnXST_FAILURE;// Set interrupt type of SW0 to rising edgeXScuGic_SetPriorityTriggerType(&INTCInst,XPAR_FABRIC_PL_IRQ0_...
I will let you know about results. The issue seems to solved after I've added the statement: XScuGic_SetPriorityTriggerType(IntcInstancePtr, INTC_INTERRUPT_ID,0x00, 0x3); Now the applications responds and counts interrupt sisgnals coming fro PL. Regards, N...
4、连接interrupt和handler,即连接中断到中断处理函数。 查看XScuGic_Connect定义。注释中描述其功能:“使中断源的Int_Id与识别中断时要运行的关联处理程序之间建立连接”。 XScuGic_Connect函数的最后两个函数,把中断的句柄和一个指针变量传递了进来。 // Connect SW1~SW2 interrupt to handler ...
51763 - Zynq-7000 - How do I know the IRQ ID# of F2P_IRQ when I connect interrupt signals from PL to PS? Description I am connecting three interrupt signals from PL to PS IRQ_F2P[15:8]. The Port tab in XPS shows the IRQ bits as follows: ...
XGpio_InterruptEnable 相应GPIO中断允许 Xil_ExceptionInit 异常处理函数 Xil_ExceptionRegisterHandler Xil_ExceptionEnable 最后编写中断服务程序,在中断服务程序中需要先禁止中断使能,完成服务程序后再打开。 总结来看,由于SDK提供的库文件使得Zynq中断使用很方便简单,并且中断源很多,加上PS部分与PL部分的配合,使用非常灵活...