Hello, I meet a problem about interrupt preemption of mpc5604 these days. Our system has many interrupts, such as iic receive, uart receive, pit interrupt and so on . I set the uart interrupt priority to 5, which is higher than iic with 3, but when I debug, the uart interrupt can't preempt the iic's interrupt leading to it miss receiving some uart bytes.
In the reference manual, it says a higher priority can preempt lower priority. But are there any setting for it?
Thanks very much.
Hi,
the feature, you are looking for is called Nested Interrupts.
Download following project and check file IntcInterrupts.c. There is defined macro INTC_NESTED_INTERRUPTS which is by default 0. This means that nested interrupts are not enabled and it is not possible to preempt executed interrupt.
If you set INTC_NESTED_INTERRUPTS to 1, interrupt with higher priority can preempt interrupt with lower priority.
https://community.nxp.com/docs/DOC-329441
If you have any other question, please feel free to write me back.
Regards,
Martin
Thank you very much ! It helps a lot !