View Single Post
  #5   Spotlight this post!  
Unread 15-12-2003, 10:39
Larry Barello Larry Barello is offline
http://www.barello.net
#0492 (Titan Robotics Club)
Team Role: Mentor
 
Join Date: Jan 2002
Location: Bellevue, WA
Posts: 85
Larry Barello has a spectacular aura aboutLarry Barello has a spectacular aura about
Re: Problem with interrupts on the PIC

Quote:
Originally Posted by Mike Betts
...
Larry,

In addition to my comment above, please be sure that you read section 2.9.2 in it's entirety. Specifically, I quote:

"If an interrupt service routine calls another function, the normal functions' temporary data section (which is named .tmpdata) should be saved using a save=section(".tmpdata") qualifier on the interrupt pragma command."

In your case, the pragma in User_Routines_Fast.c needs to be:

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

I hope this fixes your glitching problem. It did for me...
I knew it was some sort of problem of crapping on another context. I missed the fact that any routine that is called by a handler needs to save additional information. IFI should have a sample of something called by a handler so folks know what is needed.

Thanks!