打印

关于44B0中断-ads1.2

[复制链接]
1273|3
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
ccxlslr|  楼主 | 2009-5-1 11:31 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
沙发
dontium| | 2009-5-1 14:58 | 只看该作者

2440上的一段

In the interrupt service routine for a specific interrupt source, the corresponding bit of the SRCPND register has to be cleared to get the interrupt request from the same ource correctly. If you return from the ISR without clearing the bit, the interrupt controller operates as if another interrupt request came in from the same source. In other words, if a specific bit of the SRCPND register is set to 1, it is always considered as a valid interrupt request
waiting to be serviced.

使用特权

评论回复
板凳
jzdata| | 2009-5-5 17:58 | 只看该作者

__irq

我程序里都没有 __irq ,试了一次,程序跑飞,赶紧改回来,具体问题没有深究。

使用特权

评论回复
地板
myitlover| | 2009-5-7 09:08 | 只看该作者

中断进入后是需要压栈保护的

中断进入后是需要压栈保护的,而出中断是需要恢复现场的,如果加了__irq,这些工作由编译器自动完成,不加需要人工加的。

如果不加__irq的话需要你人工加入保护代码,保护相关寄存器,从SVC模式切换到IRQ等过程,加到启动代码的IRQ中断处

你可以反汇编看下加和不加__IRQ前后汇编代码的差别

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

68

主题

586

帖子

3

粉丝