当前位置:网站首页>ARM中断优先级之理解
ARM中断优先级之理解
2022-07-19 05:13:00 【wkonghua】
单片机的中断分为抢占优先级和响应优先级(子优先级),中断时首先由抢占优先级决定产生哪个中断。
抢占优先级的级别高于响应优先级。而数值越小所代表的优先级就越高。
高的抢占式优先级可以打断低的抢占式优先级,故名抢占;而在抢占式优先级相同的情况下,响应优先级越高,同时发生则先响应它,但是不能打断低响应优先级,响应表达的是响应速度。
在解释一下这里的两点:第一,如果两个中断的抢占优先级和响应优先级都是一样的话,则看哪个中断先发生就先执行;第二,高优先级的抢占优先级是可以打断正在进行的低抢占优先级中断的。而抢占优先级相同的中断,高优先级的响应优先级不可以打断低响应优先级的中断。
结合实例说明一下:假定设置中断优先级组为 2,然后设置中断 3(RTC_WKUP 中断)的抢占优先级为 2,响应优先级为 1。中断 6(外部中断 0)的抢占优先级为 3,响应优先级为 0。中断 7(外部中断 1)的抢占优先级为 2,响应优先级为 0。那么这 3 个中断的优先级顺序为:中断 7>中断 3>中断 6。
抢占优先级和响应优先级,其实是一个中断所包含的两个优先级,其中前者是对抢占优先级的级别划分,后者是相同抢占优先级的优先级别的划分。
比如:中断A抢占优先级比B高,那么A的中断可以在B里面触发,忽略响应优先级
A和B抢占优先级相同,则A、B的响应优先级决定谁先响应。
参考:https://blog.csdn.net/lr1916417519/article/details/81057810
边栏推荐
- yolov5-face
- RAC deployment of centos7x Oracle 11g (no graphical installation)
- FPGA刷题P4:使用8-3优先编码器实现16-4优先编码器、 使用3-8译码器实现全减器、 实现3-8译码器、使用3-8译码器实现逻辑函数、数据选择器实现逻辑电路
- [mindspore learning] [multi label classification] how to build a multi label mindrecord format data set of images
- Spin process
- This paper interprets DNA binding site prediction using a deep learning method
- Opencv learning (4) color conversion processing image rendering random number
- Mysql45 talking about reading notes in simple terms index (5)
- Ngnix详解(3)配置文件
- DGF网络
猜你喜欢
VSFTP服务器搭建
论文解读《Beyond Self-attention: External Attention using Two Linear Layers for Visual Tasks》
Mindspore dependent library not found
FPGA刷题P1:4选1多路选择器、异步复位的串联T触发器、奇偶校验、移位拼接乘法
mysql45讲阅读笔记全局锁和表锁(六)
Thermogram display of pathological tissue section (floating on the surface of tissue section)
论文解读《BiX-NAS: Searching Efficient Bi-directional Architecture for Medical Image Segmentation》
This paper interprets DNA binding site prediction using a deep learning method
Handwriting verification framework
Jetson Xavier NX source code compilation and installation ROS melody experience (failed)
随机推荐
[iccv2021] article, code and data link
yolov5-face
Xilinx FPGA关键资源评估
E2EC: An End-to-End Contour-based Method for High-Quality High-Speed Instance Segmentation
EIM总线如何测试可用性及稳定性
Mindscore "implementing a picture classification application" runs incorrectly
Détails de ngnix (2) pour l'installation et l'utilisation
This paper interprets DNA binding site prediction using a deep learning method
Mysql45 talking about reading notes in simple terms index (4)
[mindspore1.1] [batchnorm / gradoperation] test module infer_ Backward, find the answer
Vector exception thrown by opencv
Detailed explanation of ngnix (3) configuration file
vivado工程版本升级时相关IP版本IP Status显示Using cached IP results
mysql45讲阅读笔记全局锁和表锁(六)
Samba的搭建
瑞芯微RK3568开发板深度评测
RAC deployment of centos7x Oracle 11g (no graphical installation)
论文解读《DNA Binding Site Prediction Using a Deep Learning Method》
Debian系统移植USBWiFi RTL8192EU驱动并设置开机自启
[mindspore learning] [multi label classification] how to build a multi label mindrecord format data set of images