Seven modes of operation of ARM architecture CPU
User mode (usr): the normal program execution state of the ARM processor
System mode (sys): runs privileged operating system tasks
Management mode (svc): protection mode used by the operating system
Interrupt mode (irq): used for general interrupt processing
Fast interrupt mode (fiq): used for high-speed data transmission or channel processing
Data access termination mode (abt): The mode entered when data or instruction prefetching is terminated
Undefined mode (und): When an undefined instruction is executed, this interrupt is entered
ARM register introduction
ARM920T has 31 general registers and six program status registers, a total of 37 divided into 7 groups, corresponding to the seven working modes of the above CPU.
Each operating mode has 16 general-purpose registers and 1 (or 2) program status registers.
User mode and system mode
The registers for these two modes are the same, there are 16 general registers (R0-R15) and a program status register (CPSR).
R13 is called the stack pointer register
R14 is called the link register ->> when the program BL subroutine, it is used as a backup for R15 when an error occurs
R15 is called the program counter
cpsr is called program status register
Program Status Register CPSR
The cpsr program status register is a register used to record the current processor status. There is one cpsr for each of the seven processing modes. That is to say, the ARM architecture processor has only one cpsr, but in addition to the five modes of usr and sys, there is also a backup register of the cpsr, SPSR.
cpsr is 32 bits
31 30 29 28 27. . . . . 8 7 6 5 4 3 2 1 0
NZCV…………………….IFT M4 M3 M2 M1 M0
High four bits (28-31): condition flag bits
- Whether the result of N is negative
- Whether the Z structure is 0
- C Carry/Borrow/Shift Overflow
- V overflow flag
Middle 20 (27-8): Reserved
Lower 8 bits (7-0): control bits
- I interrupt disable bit
- F Fast interrupt disable bit
-T cpu status bit
- M0/M1/M2/M3 operating mode bits
Previous article:In STM32, the problem of interrupt function calling global variables
Next article:Specific startup code explanation about ARM interrupt
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- UCD9090A-How to use TI power sequencer in 5G MIMO applications
- Is FPGA acceleration of CNN an option? What board should I use?
- Security Tools Bombercat
- The solid state drive doesn't seem to be as good as I thought
- [NXP Rapid IoT Review] Local compilation of online generated projects
- EEWORLD University ---- Practical Guide to Motor Application Development - Based on STM32
- Simulation Help Post
- Based in Chengdu, job position: Reliability Engineer
- [FM33LG0 series development board evaluation] 01. Prepare the development environment
- [XMC4800 Relax EtherCAT Kit Review] + Getting started with DAVE, quickly build your own webserver