ARM处理器的工作模式 ARM处理器状态 ARM微处理器的工作状态一般有两种,并可在两种状态之间切换:第一种为ARM状态,此时处理器执行32位的字对齐的ARM指令;第二种为Thumb状态,此时处理器执行16位的、半字对齐的Thumb指令。在程序的执行过程中,微处理器可以随时在两种工作状态之间切换,并且,处理器工作状态的转变并不影响处理器的工作模式和相应寄存器中的内容。但ARM微处理器在开始执行代码时,应该处于ARM状态。 ARM处理器状态 进入Thumb状态:当操作数寄存器的状态位(位0)为1时,可以采用执行BX指令的方法,使微处理器从ARM状态切换到Thumb状态。此外,当处理器处于Thumb状态时发生异常(如IRQ、FIQ、Undef、Abort、SWI等),则异常处理返回时,自动切换到Thumb状态。 进入ARM状态:当操作数寄存器的状态位为0时,执行BX指令时可以使微处理器从Thumb状态切换到ARM状态。此外,在处理器进行异常处理时,把PC指针放入异常模式链接寄存器中,并从异常向量地址开始执行程序,也可以使处理器切换到ARM状态。ARM处理器模式 ARM微处理器支持7种运行模式,分别为:用户模式(usr):ARM处理器正常的程序执行状态。快速中断模式(fiq):用于高速数据传输或通道处理。外部中断模式(irq):用于通用的中断处理。管理模式(svc):操作系统使用的保护模式。数据访问终止模式(abt):当数据或指令预取终止时进入该模式,可用于虚拟存储及存储保护。系统模式(sys):运行具有特权的操作系统任务。定义指令中止模式(und):当未定义的指令执行时进入该模式,可用于支持硬件协处理器的软件仿真。ARM处理器模式 ARM微处理器的运行模式可以通过软件改变,也可以通过外部中断或异常处理改变。大多数的应用程序运行在用户模式下,当处理器运行在用户模式下时,某些被保护的系统资源是不能被访问的。 除用户模式以外,其余的所有6种模式称之为非用户模式,或特权模式;其中除去用户模式和系统模式以外的5种又称为异常模式,常用于处理中断或异常,以及需要访问受保护的系统资源等情况。ARM寄存器 ARM处理器共有37个寄存器。其中包括:31个通用寄存器,包括程序计数器(PC)在内。这些寄存器都是32位寄存器。以及6个32位状态寄存器。 关于寄存器这里就不详细介绍了,有兴趣的人可以上网找找,很多这方面的资料。异常处理 当正常的程序执行流程发生暂时的停止时,称之为异常,例如处理一个外部的中断请求。在处理异常之前,当前处理器的状态必须保留,这样当异常处理完成之后,当前程序可以继续执行。处理器允许多个异常同时发生,它们将会按固定的优先级进行处理。当一个异常出现以后,ARM微处理器会执行以下几步操作:进入异常处理的基本步骤:将下一条指令的地址存入相应连接寄存器LR,以便程序在处理异常返回时能从正确的位置重新开始执行。将CPSR复制到相应的SPSR中。根据异常类型,强制设置CPSR的运行模式位。强制PC从相关的异常向量地址取下一条指令执行,从而跳转到相应的异常处理程序处。如果异常发生时,处理器处于Thumb状态,则当异常向量地址加载入PC时,处理器自动切换到ARM状态。 ARM微处理器对异常的响应过程用伪码可以描述为: R14_ = Return LinkSPSR_= CPSRCPSR[4:0] = Exception Mode NumberCPSR[5] = 0 ;当运行于 ARM 工作状态时If == Reset or FIQ then;当响应 FIQ 异常时,禁止新的 FIQ 异常CPSR[6] = 1PSR[7] = 1PC = Exception Vector Address异常处理完毕之后,ARM微处理器会执行以下几步操作从异常返回:将连接寄存器LR的值减去相应的偏移量后送到PC中。将SPSR复制回CPSR中。若在进入异常处理时设置了中断禁止位,要在此清除。
上传时间: 2013-11-15
上传用户:hanbeidang
The Infineon TriCore provides an Interrupt System with a high safety standard. Thisdocument contains some instructions on how to initiate an Interrupt from an externaldevice. First it will show you how to trigger an Interrupt Service Request by an impulseon Port 0 or Port 1. Then in the second part of the document you can find hints how todebounce impulses to enable the use of a simple switch as input device.Authors: Thomas Bliem, CQ Nguyen / Infineon SMI MD Apps
上传时间: 2013-11-05
上传用户:uuuuuuu
This white paper discusses how market trends, the need for increased productivity, and new legislation have accelerated the use of safety systems in industrial machinery. This TÜV-qualified FPGA design methodology is changing the paradigms of safety designs and will greatly reduce development effort, system complexity, and time to market. This allows FPGA users to design their own customized safety controllers and provides a significant competitive advantage over traditional microcontroller or ASIC-based designs. Introduction The basic motivation of deploying functional safety systems is to ensure safe operation as well as safe behavior in cases of failure. Examples of functional safety systems include train brakes, proximity sensors for hazardous areas around machines such as fast-moving robots, and distributed control systems in process automation equipment such as those used in petrochemical plants. The International Electrotechnical Commission’s standard, IEC 61508: “Functional safety of electrical/electronic/programmable electronic safety-related systems,” is understood as the standard for designing safety systems for electrical, electronic, and programmable electronic (E/E/PE) equipment. This standard was developed in the mid-1980s and has been revised several times to cover the technical advances in various industries. In addition, derivative standards have been developed for specific markets and applications that prescribe the particular requirements on functional safety systems in these industry applications. Example applications include process automation (IEC 61511), machine automation (IEC 62061), transportation (railway EN 50128), medical (IEC 62304), automotive (ISO 26262), power generation, distribution, and transportation. 图Figure 1. Local Safety System
上传时间: 2013-11-05
上传用户:维子哥哥
用MDK 生成bin 文件1用MDK 生成bin 文件Embest 徐良平在RV MDK 中,默认情况下生成*.hex 的可执行文件,但是当我们要生成*.bin 的可执行文件时怎么办呢?答案是可以使用RVCT 的fromelf.exe 工具进行转换。也就是说首先将源文件编译链接成*.axf 的文件,然后使用fromelf.exe 工具将*.axf 格式的文件转换成*.bin格式的文件。下面将具体说明这个操作步骤:1. 打开Axf_To_Bin 文件中的Axf_To_Bin.uv2 工程文件;2. 打开Options for Target ‘Axf_To_Bin’对话框,选择User 标签页;3. 构选Run User Programs After Build/Rebuild 框中的Run #1 多选框,在后边的文本框中输入C:\Keil\ARM\BIN31\fromelf.exe --bin -o ./output/Axf_To_Bin.bin ./output/Axf_To_Bin.axf 命令行;4. 重新编译文件,在./output/文件夹下生成了Axf_To_Bin.bin 文件。在上面的步骤中,有几点值得注意的是:1. C:\Keil\ARM\BIN31\表示RV MDK 的安装目录;2. fromelf.exe 命令的具体语法格式如下:命令的格式为:fromelf [options] input_file命令选项如下:--help 显示帮助信息--vsn 显示版本信息--output file 输出文件(默认的输出为文本格式)--nodebug 在生成的映象中不包含调试信息--nolinkview 在生成的映象中不包含段的信息二进制输出格式:--bin 生成Plain Binary 格式的文件--m32 生成Motorola 32 位十六进制格式的文件--i32 生成Intel 32 位十六进制格式的文件--vhx 面向字节的位十六进制格式的文件t--base addr 设置m32,i32 格式文件的基地址--text 显示文本信息文本信息的标志-v 打印详细信息-a 打印数据地址(针对带调试信息的映象)-d 打印数据段的内容-e 打印表达式表print exception tables-f 打印消除虚函数的信息-g 打印调试表print debug tables-r 打印重定位信息-s 打印字符表-t 打印字符串表-y 打印动态段的内容-z 打印代码和数据大小的信息
上传时间: 2013-12-17
上传用户:AbuGe
阐述了轨道交通列车定位技术。介绍了在轨道交通系统中列车定位技术的功能,国内外轨道交通中主要采用的列车定位方法,重点论述了几种主要定位技术,并从定位精度、闭塞制式、维护投资成本、抗干扰等方面进行分析比较。提出目前轨道交通定位技术应综合运用,取长补短,多种方法相互融合,才能满足轨道交通中对安全可靠性的要求。 Abstract: Rail train positioning technology is described. The paper introduces the funetions of the train positioning technology in the rail transit system, the main methods of train positioning do mestic and international rail, and focuses on several key methods, analyzes and compares from the positioning accuracy, block system, maintenance and investment cost, interference and so on, suggested that the current rail positioning technology should be integrated use of positioning method of meriging, learn from each other, to meet the reliability requirements of rail safety.
上传时间: 2013-11-25
上传用户:franktu
This white paper discusses how market trends, the need for increased productivity, and new legislation have accelerated the use of safety systems in industrial machinery. This TÜV-qualified FPGA design methodology is changing the paradigms of safety designs and will greatly reduce development effort, system complexity, and time to market. This allows FPGA users to design their own customized safety controllers and provides a significant competitive advantage over traditional microcontroller or ASIC-based designs. Introduction The basic motivation of deploying functional safety systems is to ensure safe operation as well as safe behavior in cases of failure. Examples of functional safety systems include train brakes, proximity sensors for hazardous areas around machines such as fast-moving robots, and distributed control systems in process automation equipment such as those used in petrochemical plants. The International Electrotechnical Commission’s standard, IEC 61508: “Functional safety of electrical/electronic/programmable electronic safety-related systems,” is understood as the standard for designing safety systems for electrical, electronic, and programmable electronic (E/E/PE) equipment. This standard was developed in the mid-1980s and has been revised several times to cover the technical advances in various industries. In addition, derivative standards have been developed for specific markets and applications that prescribe the particular requirements on functional safety systems in these industry applications. Example applications include process automation (IEC 61511), machine automation (IEC 62061), transportation (railway EN 50128), medical (IEC 62304), automotive (ISO 26262), power generation, distribution, and transportation. 图Figure 1. Local Safety System
上传时间: 2013-11-14
上传用户:zoudejile
The revolution of automation on factory floors is a key driver for the seemingly insatiable demand for higher productivity, lower total cost of ownership,and high safety. As a result, industrial applications drive an insatiable demand of higher data bandwidth and higher system-level performance. This white paper describes the trends and challenges seen by designers and how FPGAs enable solutions to meet their stringent design goals.
上传时间: 2013-11-08
上传用户:yan2267246
What s inside :README - this fileINSTALL - installation instructionsstlport - main STLport include directorysrc - source and makefiles for iostreams implementationlib - installation directory for STLport library (if you use STLport iostreams only)test/regression - regression test, using wrapper iostreamstest/eh - exception handling test using STLport iostreamsetc - miscellanous files (ChangeLog, TODO, scripts, etc.)
标签: instructionsstlport installation fileINSTALL STLport
上传时间: 2014-01-19
上传用户:1159797854
This firmware translates a PS/2 mouse to a USB mouse. The translator firmware is entirely interrupt driven (with the exception of sending the data via USB to the host.) An interrupt is generated when the PS/2 start bit is received, at which time the firmware will begin its receive routine. In addition to this interrupt, every 168ms a timer overflow interrupts the main program and implements one state of the mouse state machine. This state machine handles sending bytes to and translating bytes received from the PS/2 mouse automatically. All of this is done in the background while the main program runs in the foreground. The only operation that the main program implements is sending mouse data to the PC via USB.
标签: firmware mouse translates translator
上传时间: 2015-04-26
上传用户:cuiyashuo
This PNG Delphi version 1.56 documentation (this version is a major rewrite intended to replace the previous version, 1.2). Improvements in this new version includes: This new version allows the programmer to not use Delphi heavy units which will greatly reduce the size of the final executable. Read more about this feature here. Most, if not all, Portable Network Graphics features as CRC checking are now fully performed. Error on broken images are now better handled using new exception classes. The images may be saved using interlaced mode also. Transparency information won t be discarted after the image is loaded any more. Most of the images are decoded much faster now. The images will be better encoded using fresh new algorithms. IMPORTANT! Now transparency information is used to display images.
标签: version documentation intended rewrite
上传时间: 2015-06-28
上传用户:qiao8960