View Single Post
  #6   Spotlight this post!  
Unread 23-10-2007, 19:55
MJD MJD is offline
Registered User
FRC #1325 (MOTO)
Team Role: Mentor
 
Join Date: Oct 2007
Rookie Year: 2005
Location: Mississauga
Posts: 4
MJD is an unknown quantity at this point
Smile Re: Code error causing robot to go into programming mode.

After some intensive investigation, we tracked down the issues to the interrupts. The default code has this defined:
Code:
#pragma code
#pragma interruptlow InterruptHandlerLow save=PROD/* You may want to save additional symbols. */

void InterruptHandlerLow ()
however, as we were calling functions inside the interrupt handler, it ended up corrupting one the registers, so changing that to:
Code:
#pragma code
#pragma interruptlow InterruptHandlerLow save=PROD, section(".tmpdata") /* You may want to save additional symbols. */

void InterruptHandlerLow ()
made it work properly so far. Thanks for the help!