MC9S12XEP100 interrupt collisions

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MC9S12XEP100 interrupt collisions

Jump to solution
1,194 Views
roberthiebert
Contributor IV

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

0 Kudos
1 Solution
1,185 Views
lama
NXP TechSupport
NXP TechSupport

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

 

View solution in original post

2 Replies
1,186 Views
lama
NXP TechSupport
NXP TechSupport

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

 

1,175 Views
roberthiebert
Contributor IV

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

0 Kudos