打印
[ZLG-MCU]

关于swi和svc

[复制链接]
2180|3
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
inventlwj|  楼主 | 2008-5-13 10:41 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
沙发
zlgarm| | 2008-5-13 11:23 | 只看该作者

你问的是Cortex-M3吗?

Cortex没有软件中断SWI,取而代之的是SVC。在ARM7中SWI是不同于IRQ和FIQ的,普通关中断是关不了的,可以看着是一个独立的“中断”;而Cortex-M3中SVC是跟其他中断是统一管理的,可以用CPID一起关掉。

(zlgarm_zsg)

使用特权

评论回复
板凳
inventlwj|  楼主 | 2008-5-14 08:48 | 只看该作者

谢谢zlg fae解答

arm7的swi与一般中断的区别就是fiq,irq可以关掉,而swi不能关掉?是这样吧?,我还有个不明白的地方,就是swi是同步的,由程序调用产生的,然后进入一个ISR,那和直接调用一个函数的区别是什么呢?谢谢

使用特权

评论回复
地板
zlgarm| | 2008-5-14 10:57 | 只看该作者

用法一样

其实用法一样,而且SVC也是同步的。按照Joseph Yiu的说法:
"  If you have used traditional ARM processors(such as the ARM7),you might know that they have a software interrupt instruction(SWI). The SVC has a similar function, and in fact the binary encoding of SVC instructions is the same as SWI in ARM7. However, since the exception model has changed, this instruction is renamed to make sure that programmers will properly port software code from ARM7 to the Cortex-M3."

使用特权

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

本版积分规则

9

主题

14

帖子

1

粉丝