我在中断中设置了中断优先级如下,外部中断优先级最高,但是只要我进入过外部中断后,其它中断就进不去了
void EIC_IRQ_Init(void)
{
EIC_IRQChannelPriorityConfig(UART2_IRQChannel, 5);
EIC_IRQChannelConfig(UART2_IRQChannel, ENABLE);
EIC_IRQChannelPriorityConfig(UART1_IRQChannel, 4);
EIC_IRQChannelConfig(UART1_IRQChannel, ENABLE);
EIC_IRQChannelPriorityConfig(T1TIMI_IRQChannel, 3);
EIC_IRQChannelConfig(T1TIMI_IRQChannel, ENABLE);
EIC_IRQChannelPriorityConfig(T3TIMI_IRQChannel, 2);
EIC_IRQChannelConfig(T3TIMI_IRQChannel, ENABLE);
EIC_IRQChannelPriorityConfig ( XTI_IRQChannel , 1 );
EIC_IRQChannelConfig ( XTI_IRQChannel , ENABLE );
EIC_IRQConfig(ENABLE); //使能IRQ中断
}
但是如果我把所有的中断优先级别设置成一样,中断就能顺利进行,何解??
void EIC_IRQ_Init(void)
{
EIC_IRQChannelPriorityConfig(UART2_IRQChannel, 1);
EIC_IRQChannelConfig(UART2_IRQChannel, ENABLE);
EIC_IRQChannelPriorityConfig(UART1_IRQChannel, 1);
EIC_IRQChannelConfig(UART1_IRQChannel, ENABLE);
EIC_IRQChannelPriorityConfig(T1TIMI_IRQChannel, 1);
EIC_IRQChannelConfig(T1TIMI_IRQChannel, ENABLE);
EIC_IRQChannelPriorityConfig(T3TIMI_IRQChannel, 1);
EIC_IRQChannelConfig(T3TIMI_IRQChannel, ENABLE);
EIC_IRQChannelPriorityConfig ( XTI_IRQChannel , 1 );
EIC_IRQChannelConfig ( XTI_IRQChannel , ENABLE );
EIC_IRQConfig(ENABLE); //使能IRQ中断
} |