View Single Post
  #15   Spotlight this post!  
Unread 30-10-2007, 14:21
dcbrown dcbrown is offline
Registered User
AKA: Bud
no team
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Hollis,NH
Posts: 236
dcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud of
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.