1. STM32 reduces the register bits for specifying interrupt priority to 4 bits. The grouping of these 4 register bits is as follows:
Group 0: All 4 bits are used to specify the response priority
Group 1: The highest bit is used to specify the preemptive priority, and the lowest 3 bits are used to specify the response priority
Group 2: The highest 2 bits are used to specify the preemptive priority, and the lowest 2 bits are used to specify the response priority
Group 3: The highest 3 bits are used to specify the preemptive priority, and the lowest 1 bit is used to specify the response priority
Group 4: All 4 bits are used to specify preemptive priority
//Set up NVIC
//NVIC_PreemptionPriority: preemption priority
//NVIC_SubPriority: response priority
//NVIC_Channel: interrupt number
//NVIC_Group: interrupt group 0~4
//Note that the priority cannot exceed the range of the set group! Otherwise, there will be unexpected errors
2. Priority
1. A high-priority preemption priority can interrupt an ongoing low-priority preemption interrupt.
2. Preempt interrupts with the same priority level. Interrupts with higher priority levels cannot interrupt interrupts with lower priority levels.
3. Preempt interrupts with the same priority. When two interrupts occur at the same time, the one with higher response priority will be executed first.
4. If the preemption priority and response priority of two interrupts are the same, the interrupt that occurs first will be executed first.
Previous article:EFM32 chip internal and external devices--MSC does not turn off the total interrupt
Next article:Strange problem of STM32 not being able to delay after calling SysTick_Config
- 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
- TVS Tube
- C6000 timer application (I)
- How to detect whether two points in a circuit are short-circuited to each other?
- How to handle different tasks at the same time in the time slice polling method
- LPS22HH air pressure sensor PCB package and code
- Xunwei-IMX6 development board device tree-Linux kernel configuration two-way CAN
- Looking for a chip that can be used with 485 and 232
- CC2540 beginners learning how to use buttons
- 【GD32E231_DIY Contest】① Unboxing
- Mobile 5G device antenna tuning revealed