This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

关于F28062中断嵌套问题

中断无法嵌套使用。测试方法如下,程序在没有加入for(;;);循环时,代码运行完全正常,现在每个中断服务子程序的最后加入for(;;);再次运行,发现程序进入低级别的中断服务子程序后,就无法跳到高级别的中断服务子程序, 是什么原因?难道该芯片的中断是无法嵌套使用的吗?

代码示例:

interrupt void cpu_timer1_isr(void)
{

。。。。

for(;;);
}

interrupt void sciaRxIsr(void)
{

。。。

for(;;);
}

理论上SCIA的优先级要高于TIMER1的优先级,可是程序却一直在TIMER1中断子程序中跳不出来。请教各位大师,这是为什么?

  • 可以中断嵌套,28x芯片从某种角度可以说没有中断优先级,只要符合中断要求,中断就会发生。具体请看一下例程包中的sw_prioritized_interrupts例程。以及下面这张图: