|
Re: Code error causing robot to go into programming mode.
The real gotcha is upon returning from HandlerInt2() in the example, interrupts are turned back on by the RETFIE at the end of HandlerInt2. Not too much of a problem unless the machine is saturated with interrupts and then a stack overflow condition may randomly occur due to nesting of the main interrupt handler. Turning interrupts back off in the main isr upon return would limit the exposure to this problem to only 1-2 instruction cycles. But there are better methods that can be used to avoid this althogether.
|