注册会员
- 积分
- 34
- 威望
- 24
- 贡献
- 10
- 兑换币
- 12
- 注册时间
- 2020-4-2
- 在线时间
- 0 小时
|
7#
楼主 |
发表于 2020-4-2 22:25:39
|
只看该作者
本帖最后由 冷生 于 2020-4-2 22:33 编辑
多谢!版主 看了你的说法,就去看了数据表。确实像是类似你说的这样的情况。(另外也测试了换了IRQ中断代替其中一个中断,让他们遇上一起时候,也还是会偶然冲突)
161页 中断的章节有2段。
A CPU interrupt vector is not supplied until the CPU requests it. Therefore, it is possible that a higher
priority interrupt request could override the original exception which caused the CPU to request the vector.
In this case, the CPU will receive the highest priority vector and the system will process this exception
instead of the original request.
If the interrupt source is unknown (for example, in the case where an interrupt request becomes inactive
after the interrupt has been recognized, but prior to the vector request), the vector address supplied to the
CPU will default to that of the spurious interrupt vector.
NOTE
Care must be taken to ensure that all exception requests remain active until
the system begins execution of the applicable service routine; otherwise, the
exception request may not get processed at all or the result may be a
spurious interrupt request (vector at address (vector base + 0x0010)).
意思好像就是两个中断来的很近,有可能一个中断被inactive了,但是还没来得及执行,另一个中断过来然后把它顶替了。
他也建议一定要注意执行中断完之前要保持active 。。
如果理解是这个意思的话,我再想想其他办法看看
不知道这个Inactive 的动作是哪里操作的,应该不是在中断程序里的清零flag(因为清FLAG已经是执行用户中断程序)
|
|