The interrupt vector of STM32 has two attributes, one is the preemption attribute and the other is the response attribute.
The smaller the attribute number, the higher its priority level.
Preemption refers to the attribute of interrupting other interrupts. That is, because of this attribute, nested interrupts will occur
(interrupt B is interrupted during the execution of interrupt service function A, and interrupt service function A continues to be
executed after interrupt service function B is executed). The preemption attribute is configured by
the parameters .
The response attribute is applied when the preemption attribute is the same. When the preemption priority of two interrupt vectors
is the same, if two interrupts arrive at the same time, the interrupt with higher response priority will be processed first. The response attribute
is configured by the parameters of NVIC_IRQChannelSubPriority.
For example, there are three interrupt vectors:
Interrupt vector Preemption priority Response priority
A 0 0
B 1 0
C 1 1
If the kernel is executing the interrupt service function of C, it can be
interrupted by Since B and C have the same preemption priority, C cannot be interrupted by B. However, if interrupts B and C
arrive at the same time, the kernel will first respond to interrupt B with a higher priority.
Previous article:STM32 LED water light analysis (library function version)
Next article:STM32 BUTTON方式(polling & interrupt)
- Popular Resources
- Popular amplifiers
Recommended Content
Latest Microcontroller Articles
He Limin Column
Microcontroller and Embedded Systems Bible
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
MoreSelected Circuit Diagrams
MorePopular Articles
- 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
MoreDaily News
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- 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
Guess you like
- 2020 Share my thoughts on Qian'an, a national healthy and civilized county-level city
- MOS tube drain ringing
- [Pre-register to win a multimeter and JD card] Prize live broadcast | ADI's latest switches and multiplexers, technical parameters, design...
- Awesome, liquid metal circuit printing, fast plate making, no need to wait anymore~
- Current detection methods
- [CB5654 Intelligent Voice Development Board Review] Hardware Review
- FPGA Implementation of Floating-Point LMS Algorithm
- MPLABX Compilation Failure
- Selection of aluminum electrolytic capacitors
- EEWORLD University Hall ---- FanySkill Installation Instructions For Allegro 16.617.2 Version