VDMA中断处理
来源:互联网 发布:ps淘宝美工 编辑:程序博客网 时间:2024/06/05 20:26
最近,调试VDMA中断,按照以前的方法感觉不灵了,又重新复习了一遍,参考官网例程和接口说明,重新定义了一下VDMA中断配置流程:
1. 接口配置(参考上面博文)
2. 中断配置:
2.1 XScuGic_LookupConfig (Looks up the device configuration)
2.2 XScuGic_CfgInitialize(CfgInitialize a specific interrupt controller instance)
2.3 XScuGic_SetPriorityTriggerType(Sets the interrupt priority and trigger type)
2.4 XScuGic_Connect(Makes the connection between interrupt source and the handler)
2.5 XScuGic_Enable(Enables the interrupt source)
2.6 Xil_ExceptionRegisterHandler(Makes the connection exception source)
2.7 Xil_ExceptionEnable(Enable the IRQ exception)
2.8 XAxiVdma_SetCallBack(call back interrupt function)
2.9 XAxiVdma_IntrEnable(Enable specific interrupts)
上述就是官网例程配置中断流程,也是一个学习过程。下面是实例的一部分:
IntcConfig = XScuGic_LookupConfig(INTC_DEVICE_ID);
if (NULL == IntcConfig) return XST_FAILURE;
Status = XScuGic_CfgInitialize(&Intc, IntcConfig, IntcConfig->CpuBaseAddress);
if (Status != XST_SUCCESS) return XST_FAILURE;
XScuGic_SetPriorityTriggerType(&Intc, WRITE_INTR_ID0, 0xA0, 0x3);
Status = XScuGic_Connect(&Intc, WRITE_INTR_ID0,(Xil_InterruptHandler)XAxiVdma_WriteIntrHandler,&vdmaInst0);
if (Status != XST_SUCCESS) return XST_FAILURE;
XScuGic_Enable(&Intc, WRITE_INTR_ID0); /* enable the interrupt for the DMA device */
Xil_ExceptionInit();
Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_IRQ_INT,(Xil_ExceptionHandler)XScuGic_InterruptHandler,&Intc);
Xil_ExceptionEnable(); /* enable interrupt in the Processor */
/* Register callback functions
*/
XAxiVdma_SetCallBack(&vdmaInst0, XAXIVDMA_HANDLER_GENERAL, WriteCallBack, (void *)&vdmaInst0, XAXIVDMA_WRITE);
XAxiVdma_SetCallBack(&vdmaInst0, XAXIVDMA_HANDLER_ERROR, WriteErrorCallBack, (void *)&vdmaInst0, XAXIVDMA_WRITE);
XAxiVdma_IntrEnable(&vdmaInst0, XAXIVDMA_IXR_ALL_MASK, XAXIVDMA_WRITE);
总体来说,流程还是挺多的,如果没有官方例程恐怕真不好配。
- VDMA中断处理
- VDMA解析
- 中断和中断处理
- 中断处理--串口中断
- 中断及中断处理
- 中断和中断处理
- 中断和中断处理
- 中断处理
- 中断处理
- 中断处理
- 中断处理
- 中断处理
- 中断处理
- 中断处理
- 中断处理
- 中断处理
- 中断处理
- 中断处理
- Android 通用流行框架大全
- 线程池
- mysql安装后,错误提示只有代码没有文字信息处理
- HDU 2829 DP斜率优化 解题报告
- 大学毕业生交流会演讲稿(也是我现阶段对人生的所感所悟)
- VDMA中断处理
- UGUI中使用代码动态绑定触发事件
- 新浪微博 面试
- 内存泄漏与内存溢出
- socket 之select详解
- Asp.net MVC 实例
- Android主工程、依赖包、jar包、android.jar、Android Support Library的关系
- DOM操作——怎样添加、移除、移动、复制、创建和查找节点
- Spring的事务管理