当任务在EXTI外部中断执行任务时,UART无法抢断EXTI。我设置的任务优先级 UART4是 0 0 EXTI是0 1
USART_ITConfig(UART4, USART_IT_RXNE, ENABLE);//¿ªÆôÏà¹ØÖжÏ
NVIC_InitStructure.NVIC_IRQChannel = UART4_IRQn;//´®¿Ú1ÖжÏͨµÀ
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority=0;//ÇÀÕ¼ÓÅÏȼ¶3
NVIC_InitStructure.NVIC_IRQChannelSubPriority =0; //×ÓÓÅÏȼ¶3
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; //IRQͨµÀʹÄÜ
NVIC_Init(&NVIC_InitStructure); //¸ù¾ÝÖ¸¶¨µÄ²ÎÊý³õʼ»¯VIC¼Ä´æÆ÷¡¢
NVIC_InitStructure.NVIC_IRQChannel = EXTI9_5_IRQn;//ÍⲿÖжÏ0
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x00;//ÇÀÕ¼ÓÅÏȼ¶0
//20170516 NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x00;//×ÓÓÅÏȼ¶2
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x01;//×ÓÓÅÏȼ¶2
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;//ʹÄÜÍⲿÖжÏͨµÀ
NVIC_Init(&NVIC_InitStructure);//ÅäÖÃ |