USB模拟U盘实验中[mw_shl_code=cpp,true] /* Enable the USB interrupt */
NVIC_InitStructure.NVIC_IRQChannel = USB_LP_CAN1_RX0_IRQn; //组2,优先级次之
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
/* Enable the USB Wake-up interrupt */
NVIC_InitStructure.NVIC_IRQChannel = USBWakeUp_IRQn; //组2,优先级最高
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
NVIC_Init(&NVIC_InitStructure); [/mw_shl_code]
USB的中断抢占优先级是1,次优先级是0 ,这个优先级再加入其他优先级后,SD 卡的SPI2的优先级是否也被包含在USB 的优先级中断中?
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
我也一直困惑这个优先级,工程中用开了两个定时器同样的优先级,是不是最好优先级要分开?
一周热门 更多>