在CM3_CORE.H 这个文件中有一个设置中断优先级的函数
static __INLINE void NVIC_SetPriority(IRQn_Type IRQn, int32_t priority)
{
if(IRQn < 0) {
SCB->SHP[((uint32_t)(IRQn) & 0xF)-4] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for Cortex-M3 System Interrupts */
else {
NVIC->IP[(uint32_t)(IRQn)] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for device specific Interrupts */
}
NVIC->IP 里设置的中断优先级高 还是SCB->SHP里设置的中断优先级高啊 |