DMA及中断调用

中断服务子程序中,调用DMA,完成数据从外部爽口防静电地垫RAMDSP片内的传输
中断的实现主要是在中断初始化子程序里,其详细操作如下:
首先是用于中断处理的函数:
Intr_get_cpu_intr(isn)
Intr_hook(void(*fp)(void),cpu_intr)
Intr_init()
Intr_isn(cpu_intr)
Intr_map(cpu_intr,isn)
Intr_reset()
The value *fp is a function pointer to the user supplied ISR,cpu_intr refer to the CPU interrupt number, and isn refer to the interrupt selection number that specifies the interrupt s
ource to a given CPU interrupt.
磁性材料液压机
然后是用于中断处理的宏定义:
In the following, bit refers to the bit position on which to operate, var refers to the field value, and sel is 0 for the low interrupt selector register and non_zero for the high interrupt selector refister.
INTR_CHECK_FLAG(bit)
INTR_CLK_FLAG(bit)
INTR_DISABLE(bit)
INTR_ENABLE(bit)
INTR_EXT_POLARITY(bit,val)
INTR_GET_ISN(intsel,sel)
热水回收
平开门电机INTR_GLOBAL_DISABLE()
INTR_GLOBAL_ENABLE()
INTR_MAP_RESET()
INTR_SET_FLAG(bit)
INTR_SET_MAP(intsel,val,sel)
中断实现过程
1、 初始化中断服务表指针(ISTP):intr_init();
2、 选择用哪一个中断:intr_map(CPU_INT7,ISN_EXT_INT7);
adma3、 清中断:INTR_CLR_FLAG(CPU_INT7);
4、 中断服务子程序与中断号挂钩:intr_hook(INT7_ISR,CPU_INT7);
5、 打开非屏蔽中断:INTR_ENABLE(CPU_INT_NMI);
6、 打开所选中断:INTR_ENABLE(CPU_INT7);
7、 全局中断使能: INTR_GLOBAL_ENABLE();
注意:中断处理函数都是小写的,而宏定义都是大写的。在使用中断时,每一步不是必须的,顺序也不是固定的。INT7_ISR是中断服务子程序名,名字可任意取。

本文发布于:2024-09-21 15:55:13,感谢您对本站的认可!

本文链接:https://www.17tex.com/tex/3/334472.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:中断   子程序   服务   处理   用于   爽口   防静电
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2024 Comsenz Inc.Powered by © 易纺专利技术学习网 豫ICP备2022007602号 豫公网安备41160202000603 站长QQ:729038198 关于我们 投诉建议