ARM has 7 exceptions: data abort, fast interrupt request, interrupt request, pre-fetch abort, software interrupt, reset and undefined instruction.
There are two types of interrupts. The first type is caused by peripherals, namely IRQ and FIQ. The second type is a special instruction that causes an interrupt, SWI. Both interrupts will suspend normal program execution.
Exceptions are any situation that requires the normal execution of instructions to be terminated, including reset of the ARM core, failure of instruction fetch or memory access, encountering an undefined instruction, executing a software interrupt instruction, or an external interrupt. Exception handling is the method of dealing with these exceptional situations. Most exceptions correspond to a software exception handler, a software program that is executed when an exception occurs.
Each exception causes the core to enter a specific mode. Each processor mode has its own set of grouped registers, and the processor mode determines which registers are active and the full read/write access to the cpsr. At the same time, any ARM processor mode can be entered by programmatically changing the cpsr. User and system modes are not entered through exceptions, and can only modify the cpsr.
Exceptions and their modes
Exception Mode Purpose
Fast interrupt request FIQ Fast interrupt request processing
Interrupt request IRQ Interrupt request processing
SWI and reset SVC Protected mode of the operating system
Prefetch abort and data abort abort Virtual memory or memory protection processing
Undefined instruction undefined Software emulation of hardware coprocessor
An interrupt is a special exception caused by an ARM peripheral. IRQ exceptions are used for normal operating system transaction processing. FIQ exceptions are generally reserved for individual interrupt sources. IRQ can be interrupted by FIQ, but IRQ cannot interrupt FIQ. In order to make FIQ faster, this mode has more shadow registers. FIQ cannot call SWI (software interrupt). FIQ must also disable interrupts.
Each peripheral device has an interrupt line connected to the vectored interrupt controller. The interrupt sources of peripheral functions are generally WDT, timer, UART, I2C, SPI, RTC, A/D, etc. The priority of these interrupts can be set through registers.
Previous article:Implementation of AMR Speech Codec in TD-SCDMA System
Next article:Use of ARMer9 development platform based on s3c2410
- Popular Resources
- Popular amplifiers
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
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- HFSS Wave Ports and Lumped Ports
- Using the MS-formula library of st 3.1, the scan results do not contain the device name
- What does it mean when the port latch is set to 1? How should I understand this sentence? It would be better if there is a picture to illustrate it.
- Simplifying Equalization Design for USB 3.0 Systems
- Understand these! The subtle differences between RS-232, RS-422, and RS-485
- Teach you step by step to achieve the spotlight effect
- [2022 Digi-Key Innovation Design Competition] + Smart Cup Holder-01 Unboxing Photos
- MSP430F5529LP's P1.4 port outputs a single PWM wave
- Lead and Lag Oscillators
- EEWORLD University Hall----Live playback: IoT display solution using DLP? micro-projection technology