可冰

冰,是沉睡着的水......

  C++博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  37 随笔 :: 5 文章 :: 94 评论 :: 0 Trackbacks
在系统加电或重启后,自动进入的是哪一种工作模式呢?
可能是svc模式吧,因为它是用于操作系统管理的.不过还是弄清楚的再下定论.
可以写个程序,将启动后的CPSR的值打印出来,不就清楚了!

posted on 2006-03-26 12:39 可冰 阅读(326) 评论(1)  编辑 收藏 引用 所属分类: 嵌入式系統

评论

# re: 系统Reset后处于哪种状态下? 2006-03-26 13:03 可冰
系统手册[2-15]
--------------------------------------
RESET
When the nRESET signal goes LOW, ARM920T abandons the executing instruction and then continues to fetch
instructions from incrementing word addresses.
When nRESET goes HIGH again, ARM920T:
1. Overwrites R14_svc and SPSR_svc by copying the current values of the PC and CPSR into them. The value of
the saved PC and SPSR is not defined.
2. Forces M[4:0] to 10011 (Supervisor mode), sets the I and F bits in the CPSR, and clears the CPSR's T bit.
3. Forces the PC to fetch the next instruction from address 0x00.
4. Execution resumes in ARM state.
--------------------------------------
当~nRESET信号(低电平有效)有效时,ARM920T终止当前指令的执行,而连续不断地获取下一字地址处的指令;当~nRESET恢复为高电平时,ARM920T执行下面的操作:
1. 拷贝当前PC和CPSR的值到R14_svc和SPSR_svc中.而保存过的PC和SPSR的值未定义(不确定).
2. M[4:0] <-- 10011,转到Supervisor模式,设置CPSR中的I、F位为1(禁止中断),并对T位清零(进入ARM状态).
3. 设置PC从0x00处获取下一条指令.
4. 在ARM状态下执行指令.
  回复  更多评论
  


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理