Board logo

标题: 问高手一个问题!很重要得问题! [打印本页]

作者: xuguostar    时间: 2005-7-7 09:06     标题: 问高手一个问题!很重要得问题!

当系统进入一个中断服务程序后,立即执行开中断操作,这钟情况下,其它优先级更高得中断是否可以打断这个中断服务程序,等执行完后,返回断点继续执行该中断服务程序。这样就实现了中断得嵌套!

  是这种情况吗?望高手指教!
作者: libingqiang    时间: 2005-7-7 10:16

同样期待中
作者: lhp5890    时间: 2005-7-7 10:23

具有中断嵌套的CPU是不需要再在中断中开中断的,直接用就是了,更楼上说的一样
作者: strongchen    时间: 2005-7-7 10:36

当系统进入一个中断服务程序后,系统会自动关中断,然后当退出中断服务程序(执行RTI指令)时再开中断。如果进入中断服务程序后手动开中断,系统会立即响应已有的中断请求,而不管此中断的级别比当前中断级别高还是低。中断级别的作用是,当多个中断请求同时发生时,系统会先响应级别最高的中断。
要实现中断嵌套,必须在中断服务程序中手动开中断。但是中断嵌套会占用系统大量的资源,也导致程序非常复杂。一般不推荐使用。
作者: lionheart    时间: 2005-7-8 15:25

感谢楼上的
作者: achao86926    时间: 2009-2-28 14:30

我这里有一些关于HCS12中断介绍的资料,请参考以下吧

axMJHQBh.rar (11.06 KB)


附件: [问高手一个问题!很重要得问题!] axMJHQBh.rar (2009-2-28 14:08, 11.06 KB) / 下载次数 122
http://bbs.eccn.com/attachment.php?aid=6508&k=fdca36590a60add7115e1eadaa910a1f&t=1728175420&sid=rT0rh8
作者: achao86926    时间: 2009-2-28 14:33

我还有问题请问大家,S12XS系列的单片机中断与其之前的版本比如HCS12有什么不同吗?我这有关于S12XS介绍的英文资料,但我还是不明白中断嵌套到底如何用啊?请好心人解释以下吧

Interrupt Nesting

The interrupt request priority level scheme makes it possible to implement priority based interrupt request
nesting for the I bit maskable interrupt requests handled by the CPU.

* I bit maskable interrupt requests can be interrupted by an interrupt request with a higher priority,
so that there can be up to seven nested I bit maskable interrupt requests at a time (refer to Figure 4-
14 for an example using up to three nested interrupt requests).

I bit maskable interrupt requests cannot be interrupted by other I bit maskable interrupt requests per
default. In order to make an interrupt service routine (ISR) interruptible, the ISR must explicitly clear the
I bit in the CCR (CLI). After clearing the I bit, I bit maskable interrupt requests with higher priority can
interrupt the current ISR.

An ISR of an interruptible I bit maskable interrupt request could basically look like this:

* Service interrupt, e.g., clear interrupt flags, copy data, etc.
* Clear I bit in the CCR by executing the instruction CLI (thus allowing interrupt requests with
higher priority)
* Process data
* Return from interrupt by executing the instruction RTI


作者: chenjake    时间: 2009-3-2 11:03

非常感谢版主~很受教育啊
作者: achao86926    时间: 2009-3-3 12:07

对于陈坛主的这句话:如果进入中断服务程序后手动开中断,系统会立即响应已有的中断请求,而不管此中断的级别比当前中断级别高还是低。我有疑惑,这样的话我要实现多层(3层以上)中断嵌套是不可能的了?
作者: fjczd    时间: 2009-3-3 13:26

这样一来就很难实现中断嵌套了

或者说中断嵌套 这个功能的意义不是很大






欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0