M5213 spurious interrupt?

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

M5213 spurious interrupt?

3,662 Views
jes
Contributor I
I'm using a M5213EVB eval board in CodeWarrior IDE.  I have all UARTs configured and a timer tick on PIT0 at 1000 Hz.  Without the PIT0 ISR enabled I can reliably receive and transmit data on any of the UART channels via UART ISRs.  However, with PIT0 enabled I'm getting what I'd characterize as a spurious interrupt at vector 127 which prints out a debug msg to UART0 stating "User Defined Vector #127" but only after having attempted to transmit data via my UART ISR.  Without any serial data received or transmitted the PIT0 operates at its programmed rate (reliably switching tasks).  I don't have this bit for vector 127 masked on in IMR so 1.) I don't know why it's even vectored to. 2.) I can't account for any inconsistencies in my setup of PIT0 that might be causing this.
 
I've tried to reset the PIF bit of PIT0 initially by writing to PMR register with reload value (even though I've configured RLD bit to 1) and then changed that thinking that could be the problem by instead writing 1 to PIF bit to clear PIF flag.  Neither has prevented the 'spurious' condition.
 
Anyone have any ideas what might be causing this interrupt 127?  I've checked documentation reference about possible spurious interrupt conditions concerning the SR register but there doesn't seem to be a conflict.
 
Thanks.
Labels (1)
0 Kudos
2 Replies

278 Views
DavidS
NXP Employee
NXP Employee
Hi Jes,
Please make sure that when using interrupts that the ICR registers are being programmed to unique values (i.e. combined value of the IL and IP must not be equal to any other ICR register). Another way to say it is no two ICR registers may have the same value.
Regards, DavidS
0 Kudos

278 Views
jes
Contributor I
Sorry for the late response.  Yes, you are correct.  I changed the interrupt levels and priorities to be unique and the spurious interrupt disappeared.  Thanks.
0 Kudos