What are FIQ and IRQ
FIQ (fast interrupt) and IRQ (normal interrupt) are two processor modes in ARM processors. ARM has 7 processing modes. Both modes are used to handle interrupts. The concept of interrupts will not be elaborated here. If you are not familiar with ARM's exception handling mechanism and registers, it is recommended to read the blog "Detailed Explanation of ARM's 37 Registers and Exception Handling Mechanism". The following content will involve related concepts.
Difference between FIQ and IRQ
Essentially, both are interrupts, but FIQ has a higher priority than IRQ, and the response time of FIQ is also faster than IRQ. Simply put, FIQ is the VIP in IRQ and enjoys privileges. In ARM, you can generally set an interrupt as FIQ. When an interrupt is set as FIQ, it can jump the queue, and the next interrupt to be processed is FIQ. Some can even directly interrupt the currently processed IRQ. This is divided into preemptive and non-preemptive.
Why are interrupts divided into FIQ and IRQ
Today's systems need to interact with users frequently, and the user experience depends largely on the response time. Imagine how you would feel if the system takes a minute to respond after you click the mouse. The system does not know when an interrupt will occur. When multiple interrupts occur, the system usually handles the interrupts in the order in which they occur. However, the urgency of the interrupts is different. For example, two interrupts are generated now, one is generated by the background program, and the other is when the user clicks the mouse. If you handle the interrupt generated by the background program first and then respond to the mouse, the user will feel that the system is stuck and the response is very slow. In fact, it is no big deal if the background program is processed slowly, and the user is not in a hurry now. In this case, we can respond to the mouse first and set the mouse to FIQ to improve the user experience.
The reason why FIQ responds faster than IRQ
1. FIQ has a higher processing priority than IRQ and can even interrupt the executing IRQ;
2. FIQ mode has its own unique registers, while IRQ needs to share registers with other modes, which will be faster in the protection/recovery scene of interrupt processing;
3. In the exception vector table, FIQ is at the very end. In the exception vector table, IRQ can only store the first address of the interrupt handler, and a jump is required when IRQ occurs; while FIQ is at the very end, so the interrupt handler in FIQ mode can be directly stored next to it, so there is one less jump when processing FIQ.
Previous article:ARM chip development learning (S5PV210) - icache, dcache introduction and how to turn on and off icache
Next article:ARM chip learning (S5PV210 development) - GPIO control LED
Recommended ReadingLatest update time:2024-11-16 07:50
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- 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
- [Mill MYB-YT507 development board trial experience] Python displays memory and CPU real-time status 1
- How do RF circuits and digital circuits coexist harmoniously?
- Xiangshan high-performance RISC-V processor
- Issues with converting remaining TI points into chip points
- Development process of eCAN in DSP28335
- Sugar gliders Part ⑩ Sugar glider health monitoring system based on RSL10 - host computer design
- Can someone help me figure out whether this active filter is a voltage-controlled power supply type or a multiple feedback type?
- 【BearPi-HM Nano】NFC test
- Frost has fallen~
- Summary by an expert: Answers to 23 classic questions in power supply development!