Content originally posted in LPCWare by DEGoodmanWilson on Fri Nov 18 00:25:58 MST 2011
Update: Still a mystery.
Here's what I did:
Disabled the receive interrupt. Called ISR directly from my code. No crash. Inserted dummy function ahead of ISR, and called it repeatedly, no crash. CAN frames are received just fine this way. So it's neither the contents of, nor the location of the ISR that is the issue.
Re-enable receive interrupt. Calling ISR directly = no hang. Calling dummy function = no hang. Receiving a CAN frame, which triggers receive interrupt = immediate hang.
Further inspection reveals that it's nothing special about the receive interrupt. Enabling any CAN interrupt, and then triggering it, causes the hang. Barf.
Even further inspection reveals that previously working code that used the RIT interrupt now hangs; if I disable the RIT interrupt, it runs fine (well, minus the things it needed the RIT for, anyway). So it looks like other interrupts are toasted too, contrary to what I said earlier.
I'm guessing at this point I just have bad hardware, that somewhere along the way handling it must have zapped something. Bah.