cm0中断优先级

在这里插入图片描述
英文原版:Each priority field holds a priority value, 0-192. Thelower the value, the greater the priority of thecorresponding interrupt. The processor implementsonly bits[7:6] of each field, bits [5:0] read as zeroand ignore writes. This means writing 255 to apriority register saves value 192 to the register.
意思是IPR这个32位的寄存器,有4个中断的优先级,但是8位中只有高2位[7:6]代表优先级,及2bit能代表的0~4,剩余的[5:0]都是0。
在这里插入图片描述
hal库中是下面这样的
在这里插入图片描述
及cm0这个arm的内核不支持次优先级,且抢占优先级能设置的为0~4,符合手册里的描述。

猜你喜欢

转载自blog.csdn.net/weixin_43810563/article/details/113691982