STM32F407的中断嵌套外部中断打断不了串口中断

2019-07-14 14:28发布

我做了一个STMF407的中断嵌套,代码如下:
    NVIC_PriorityGroupConfig(NVIC_PriorityGroup_3);
    NVIC_InitStructure.NVIC_IRQChannel = EXti15_10_IRQn;
    NVIC_InitStructure.NVI_IRQChannelPreemptionPriority = 0;
    NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
    NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
    NVIC_Init(&NVIC_InitStructure);
    NVIC_InitStructure.NVIC_IRQChannel = USART2_IRQn;
    NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 3;
    NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
    NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
    NVIC_Init(&NVIC_InitStructure);

但运行下来,串口中断和外部中断都可以运行,但外部中断打断不了串口中断,没有实现中断嵌套。
请高手看看怎么回事。多谢了。
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。