I have a perplexing problem with a 52221 processing receive interrupts from uart0. I am running CW7.1.1 if that matters.
Basically, it all seems to work, but out of the blue, occasionally, I take vector 125 of the IVT! Vector 125 is interrupt source 61, which is supposedly "CFM, PVIF, Protection violation".
Now, of course, I don't have the CFM enabled to interrupt (CFMMCR is 0), and it isn't actually requesting one (CFMUSTAT is 0xc0). However, on the stack, plain as day, is a trap frame indicating vector 125:
41F42004 --> 0100 00(01 1111 01)00 --> 0x7d --> 125
And the stack is valid, within bounds, etc.
At the time, of course, IPRH (0x00A00000) does not indicate this interrupt is pending (though the uart0 and USB interrupts are, as well as pit0), though the "Cleared automatically" in the interrupt sources table makes me wonder if I should see it there even if it was...
This only occurs when using uart0 along with USB; both devices are configured to IPL 4, so they should be mutually exclusive.
Now here is where things get crazy!!!
The interrupt source number for usb is 53... The interrupt source number for uart0 is 13. IF I "OR" (bitwise) THESE TOGETHER WE GET 61, WHICH WOULD LEAD TO VECTOR 125!!!
CAN THIS BE HAPPENING? Could the simultaneous uart0 and USB interrupts cause the vector numbers to be or'd???
Or what could I possibly be doing wrong to cause this?
If I just make vector 125 do shadow the uart0 vector, everything works (which is both good and scary).