stm32 优先级说明

抢占优先级和响应优先级,其实是一个中断所包含的两个优先级,其中前者是对抢占优先级的级别划分,后者是相同抢占优先级的优先级别的划分。
比如:
中断A抢占优先级比B高,那么A的中断可以在B里面触发,忽略响应优先级;
A和B抢占优先级相同,则A、B的响应优先级决定谁先响应;

总之 , 抢占优先级厉害
具体我们可以参考官方提供的table
00080 The table below gives the allowed values of the pre-emption priority and subpriority according
00081 to the Priority Grouping configuration performed by NVIC_PriorityGroupConfig function
00082 ============================================================================================================================
00083 NVIC_PriorityGroup | NVIC_IRQChannelPreemptionPriority | NVIC_IRQChannelSubPriority | Description
00084 ============================================================================================================================
00085 NVIC_PriorityGroup_0 | 0 | 0-15 | 0 bits for pre-emption priority
00086 | | | 4 bits for subpriority
00087 —————————————————————————————————————————-
00088 NVIC_PriorityGroup_1 | 0-1 | 0-7 | 1 bits for pre-emption priority
00089 | | | 3 bits for subpriority
00090 —————————————————————————————————————————-
00091 NVIC_PriorityGroup_2 | 0-3 | 0-3 | 2 bits for pre-emption priority
00092 | | | 2 bits for subpriority
00093 —————————————————————————————————————————-
00094 NVIC_PriorityGroup_3 | 0-7 | 0-1 | 3 bits for pre-emption priority
00095 | | | 1 bits for subpriority
00096 —————————————————————————————————————————-
00097 NVIC_PriorityGroup_4 | 0-15 | 0 | 4 bits for pre-emption priority
00098 | | | 0 bits for subpriority
00099 ============================================================================================================================

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值