I have a problem where my timer interrupt (irq 30) at priority 2 is not interrupted by an uart interrupt (irq 79) with priority 6. Are there any special measures to be taken if this priority should work as expected. I'm calling another function from the timer ISR, is that OK?
Hi Bengt,
if you use CodeWarrior, there is macro in IntcInterrupts.c file called INTC_NESTED_INTERRUPT. If you want to preempt one interrupt by some other with higher priority, set this macro to 1.
If you look at lines below in this file, you will find conditional compilation code. If INTC_NESTED_INTEERUPT is 1, part with prolog and epilog is used.
About calling function in ISR, it depends on the implementation, but in general there is not any system problem.
If you have any other question, please feel free to write me back.
Regards,
Martin
Hi Martin!
I have another question. Why are nested interrupts not the default behavior in CW? Is this feature not recommended?
Regards Bengt
Hi Bengt,
I am not able to tell you, why nested interrupts are not default behavior, but there is no problem with this feature. From my point of view, you do not have to worry about it. Of course there should appear a problem if you incorrectly design the algorithm, but it is application dependent. I think you can definitely use nested interrupts, if it bring you some advantages.
If you have any other questions, please feel free to write me back.
Regards,
Martin
Hi Martin!
Pretty obvious now that I know where to look :smileyhappy:
Tested and works as expected!
Thanks!!
Regards Bengt