MC9S12XEP100, absolute assembly.
I have a program that uses 3 ECT timer channels for input capture, 5 ECT channels for output compare, 5 TIM channels for output compare and RTI, all of which use interrupts. The program works well except I am getting random errors on the timer channels. In the process of troubleshooting it with a digital logic analyzer, the traces look like I am getting interrupt collisions. It is understandable that I could get two or more interrupt service requests at the same time, but I'm not clear on how to handle this. I've studied chapters 6 and 14, but I'm still confused. What appears to be happening is that when a collision occurs, one of the interrupts gets serviced, but the other does not. I've experimented with priority levels on the various channels but that doesn't help. I was under the impression that if two interrupts are requested at the same time, one will take priority, but the other will be serviced as soon as the priority routine has finished. This does not appear to be happening. I probably have a setting wrong, but I can't see where I have made any errors there. Any suggestions would be greatly appreciated.
Regards,
Robert
已解决! 转到解答。
Hi,
in such issues it is good to share SW for setup and interrupt routine. However, it sounds to me like incorrect interrupt flag clearing. Please look at: https://www.nxp.com/docs/en/application-note/AN2554.pdf
Best regards,
Ladislav
Hi,
in such issues it is good to share SW for setup and interrupt routine. However, it sounds to me like incorrect interrupt flag clearing. Please look at: https://www.nxp.com/docs/en/application-note/AN2554.pdf
Best regards,
Ladislav
Hi Ladislav,
BRILLIANT! That did it. I've been troubleshooting this for two weeks now, trying everything I could think of but I wasn't aware of that application note. Thank you so much.
Regards,
Robert