View Single Post
  #15   Spotlight this post!  
Unread 08-11-2005, 16:35
Mike Bortfeldt Mike Bortfeldt is offline
Registered User
FRC #1126 (& 1511)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2004
Location: Rochester, NY
Posts: 119
Mike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud of
Re: EDU Mini Controller & 2005 Nav Code

Another possibility since you are using ISRs is that a compiler generated temporary variable (or MATH variable) being used by your main code is being overwritten during the execution of the ISR. If this is happening, then your code can behave very unpredictably. As a quick check, look just before the "void InterruptHandlerLow ()" routine in the user_routines_fast.c file, there should be a line similar to the following:

#pragma interruptlow InterruptHandlerLow save=PROD, section(".tmpdata"), section("MATH_DATA")

At a minimum, the PROD & ".tmpdata" section should be in the #pragma statement. While Kevin's code contains both of these, the default EDU code does not. The MATH_DATA section is probably not needed but for testing purposes it won't hurt to add it just in case (except for some additional latency executing the interrupts). Kevin's code usually includes multiple versions of this line, so you may be able to just uncomment the correct one. This may not help, but I thought it was at least worth a mention.

Mike