I have been pulling my hair out over this.
My code was running fine and then I had to change the communication interface a bit. When I went to start testing it, whenever I would restart the code after a break point, it would jump into one of those system interrupts. Either misaligned long word, hardware stack overflow (I would see like 3 entries in the stack window too), or illegal instruction.
I disabled ALL of my interrupts so that I could make sure that it wasn't something interrupt related. Then I started stripping out code to see if I could narrow it down. But still the problem arose.
I put a few break points in my function that sets the ADC registers. If I stop on these, I see weird values in the ADC rgisters and then, after a start, I will jump to one of those interrupts. However, if I put the breakpoint AFTER the function, the values in the ADC registers are fine. It is like they don't get set properly if I break in the function. . . and where I jump out of the program and what interrupt I jump into depends on where I put the interrupts.
I tried going back to code that I was using months ago that was working flawlessly (except we had to change the communication interface) and I see the same behavior with the break points.
Does anyone have any possible explanation for this behavior?