View Single Post
  #3   Spotlight this post!  
Unread 10-02-2005, 15:41
Orborde Orborde is offline
Registered User
FRC #1747
Team Role: Mentor
 
Join Date: Apr 2004
Rookie Year: 2003
Location: Indianapolis, IN
Posts: 44
Orborde has a spectacular aura aboutOrborde has a spectacular aura about
Send a message via AIM to Orborde
Re: Securing interrupt-driven timers

Thanks for helping. I panic easily.
Quote:
Originally Posted by Alan Anderson
The clock read itself takes less time than an interrupt service routine.
That's the kicker right there for me. I'll change it disable all interrupts.

Also, I currently have the interrupt handler for the clock written as a function that will be called from the interrupt service routine every time it runs. This function does the check to see if the timer triggered the interrupt and, if so, increments the timer. Would it be significantly better to hack out a macro (to put the code directly in the ISR) for the check/increment or is it fine as it is? Also, no other interrupts can occur until the ISR returns, right?