ImageVerifierCode 换一换
格式:DOCX , 页数:19 ,大小:235.78KB ,
资源ID:11750364      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/11750364.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(ExceptionandInterruptHandlinginARM.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

ExceptionandInterruptHandlinginARM.docx

1、ExceptionandInterruptHandlinginARMException and Interrupt Handling in ARMArchitectures and Design Methods for Embedded SystemsSummer Semester 2006Author: Ahmed Fathy Mohammed AbdelrazekAdvisor: Dominik LckeAbstractWe discuss exceptions and interrupt handling techniques in ARM processors and see how

2、the ARM architecture works in this area to know how are these techniques suitable for embedded systems to achieve the time constraints and safety requirements. Exception and interrupt handling is a critical issue since it affect directly the speed of the system and how fast does the system respond t

3、o external events and how does it deal with more than one external event at the same time by assigning priorities to these events.Table of contentsAbstract.2Table of contents.2List of Figures.3Abbreviations.31 Introduction.41.1 ARM modes of operation.41.2 ARM Register set.5.62 ARM Exceptions.62.1 Ve

4、ctor Table.72.2 Exception priorities.82.3 Link Register Offset.82.4 Entering and exiting an exception handler.93 Interrupts.93.1 How are interrupts assigned?.93.2 Interrupt Latency.103.3 IRQ and FIQ exceptions.103.4 Interrupt stack.104 Interrupt handling schemes.114.1 Non-nested interrupt handling.1

5、14.1.1 Non-nested interrupt handling summery:.124.2 Nested interrupt handling.124.2.1 Nested interrupt handling summery:.134.3 Prioritized simple interrupt handling.134.3.1 Prioritized simple interrupt handling summery:.144.4 Other schemes.155 Final remarks.16Which interrupt handling scheme to use?.

6、16References.17List of FiguresFigure 1: Register Organization in ARM 5.6Figure 2 An exact vector table with the branching instruction5.7Figure 3 Typical Memory Layouts.11Figure 4 Simple non nested interrupt handlers.12Figure 5 Nested Interrupt Handling.13Figure 6 Priority Interrupt Handler 1.14Abbre

7、viationsISR Interrupt Service RoutineInterruptRequestFIQ Fast Interrupt RequestARM Advanced RISC MachinesRISC Reduced Instruction Set ComputersCPSR Current Program Status RegisterSPSR Saved Program Status RegisterRegisterRegisterDMA Direct Memory Access1 IntroductionExceptions are so important in em

8、bedded systems, without exception the development of systems would be a very complex task. With exceptions we can detect bugs in the application, errors in memory access and finally debug it by placing breakpoints and building the program with debugging information.Interrupts which are kinds of exce

9、ptions are essential in embedded systems. It enables the system to deal with external events by receiving interrupt signals telling the CPU that there is something to be done instead of the alternative way of doing the same operation by the pooling mechanism which wastes the CPU time in looping fore

10、ver checking some flags to know that the event occurred.Due to the fact that systems are going more complex day after day, we have nowadays systems with more than one interrupt source. That is why an interrupt handling scheme is needed to define how different cases will be handled. We may need prior

11、ities to be assigned to different interrupts and in some other cases we may need nested handling capabilities.We introduce the ARM processor itself to see its different modes of operation and then we have an overview of the register set. This is because dealing with interrupts and exceptions causes

12、the ARM core to switch between these modes and copy some of the registers into other registers to safe the core state before switching to the new mode. In the next chapter we introduce exceptions and see how the ARM processor handles exceptions. In the third chapter we define interrupts and discuss

13、mechanisms of interrupt handling on ARM. In the forth chapter we provide a set of standard interrupt handling schemes. And finally some remarks regarding these schemes and which one is suitable to which application.The main source of information provided in this paper is mainly the book “ARM System

14、Developers Guide” 1.1.1 ARM modes of operationThe ARM processor internally has 7 different modes of operation, they are as follows; User mode: It is used for normal program execution state, FIQ mode: This mode is used for interrupts requiring fast response and low latency like for example data trans

15、fer with DMA, IRQ mode: This mode is used for general interrupt services, Supervisor mode: This mode is used when operating system support is needed where it works as protected mode, Abort mode: selected when data or instruction fetch is aborted, system mode: Operating system privilege mode for user

16、s and undefined mode: When undefined instruction is fetched. The following table summarizes the 7 modes:Processor ModeUser (usr)FIQ (fiq)IRQ (irq)Supervisor (svc)Abort (abt)Undefined (und)System (sys)Description Normal program execution mode Fast data processing mode For general purpose interrupts A

17、 protected mode for the operating system When data or instruction fetch is aborted For undefined instructions Operating system privileged mode1.2 ARM Register setRegister structure in ARM depends on the mode of operation. For example we have 16 (32-bit) registers named from R0 to R15 in ARM mode (us

18、r).Registers R0 to R12 are general purpose registers, R13 is stack pointer (SP), R14 is subroutine link register and R15 is program counter (PC).R16 is the current program status register (CPSR) this register is shared between all modes and it is used by the ARM core all the time and it plays a main

19、 role in the process of switching between modes.In other modes some of these 16 registers are visible and can be accessed and some others are not visible and cant be accessed. Also some registers are available with the same name but as another physical register in memory which is called (banked), ex

20、istence of such banked registers decreases the effort needed when context switching is required since the new mode has its own physical register space and no need to store the old modes register values.So in ARM7 we have a total of 37 physical registers and the following figure shows the ARM7 regist

21、er set.More bankedregisters, sois fasterFigure 1: Register Organization in ARM 5As we can see the banked registers are marked with the gray colour. We can notice that in the FIQ mode there are more banked registers, this is to speed up the context switching since there will be no need to store many registers when switching to the FIQ mode. We may need only to store the values of registers r0 to r7 if the FIQ handler needs to use those registers, but registers r8_fiq to r14_fiq are specific registers for the FIQ mode and

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1