MSP432有抢占优先级和子优先级的划分吗?如果有,抢占优先级的位数怎么控制的?
Susan Yang:
有的,您可以看一下TRM内的相关内容
www.ti.com.cn/…/slau356h.pdf
1.5.6 Interrupt Priority Grouping
To increase priority control in systems with interrupts, the NVIC supports priority grouping. This grouping divides each interrupt priority register entry into two fields:
• An upper field that defines the group priority
• A lower field that defines a subpriority within the groupOnly the group priority determines preemption of interrupt exceptions. When the processor is executing an interrupt exception handler, another interrupt with the same group priority as the interrupt being handled does not preempt the handler.
If multiple pending interrupts have the same group priority, the subpriority field determines the order in which they are processed. If multiple pending interrupts have the same group priority and subpriority, the interrupt with the lowest IRQ number is processed first.
为了对具有大量中断的系统加强优先级控制,NVIC支持优先级分组机制。使用 SCB Registers 中 AIRCR 的 PRIGROUP 区来将每个 PRI_n 中的值分为组优先级区和次优先级区。
更多内容您可以查看
2.4.5.4 AIRCR Register (Offset = D0Ch) [reset = FA050000h]
gaoyang9992006:
查看库函数中,中断函数的头文件,里面有详细的注释和说明