View Single Post
  #9   Spotlight this post!  
Unread 07-04-2006, 12:58
Matt Krass's Avatar
Matt Krass Matt Krass is offline
"Old" and Cranky. Get off my lawn!
AKA: Dark Ages
FRC #0263 (Sachem Aftershock)
Team Role: Mentor
 
Join Date: Oct 2002
Rookie Year: 2002
Location: Long Island, NY
Posts: 1,187
Matt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond repute
Send a message via AIM to Matt Krass
Re: GTS Code Error (the red light of doom!)

I hate to nitpick but this is starting to become a growing problem...

Code:
*	COMMENTS:	You are free to use this source code for any non-commercial
*				use. Please do not make copies of this source code, modified
*				or un-modified, publicly available on the internet or
*				elsewhere without permission. Thanks.
He's explained his reasoning several times already, and I know you did not mean harm but it would probably be best to only post the relevant parts (i.e. your changes from the supplied versions) in the future.

As far as your problem, how repeatable is it? Does the code error happen immediately? If so it may not be a problem with the interrupts, since they wouldn't get called unless you spun a wheel. Except I believe the ISR is shared between the digital IO interrupts and the communication interrupts with the camera, so check your pragma.

Also, try this #pragma in it's place:
Code:
#pragma interruptlow InterruptHandlerLow save=PROD,section("MATH_DATA"),section(".tmpdata")
That tells it to save more than what your line saves, we had some red-light problems when our interrupts were overwriting data we needed because the ISR didn't preserve it.
Good luck!
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!

I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)