Author Topic: Timer Overflow Interrupt not working  (Read 3168 times)

0 Members and 1 Guest are viewing this topic.

Offline mbatemanTopic starter

  • Full Member
  • ***
  • Posts: 82
  • Helpful? 0
    • Robotics 4 Fun
Timer Overflow Interrupt not working
« on: October 21, 2008, 05:32:54 PM »
I think I must be missing something obvious. I am trying to use timer5 on the Axon. The timer itself is acting as expected, but I can't seem to get the overflow interrupt to work.

To test, I just did a very simple case...

Code: [Select]
ISR(TIMER5_OVF_vect) {
rprintf("Overflow!!!\r\n");
}

I do have external overflows working just fine, so I know global interrupts are enabled. Is there somewhere that I need to enable the timer5 overflow interrupt?

Offline bens

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 335
  • Helpful? 3
Re: Timer Overflow Interrupt not working
« Reply #1 on: October 21, 2008, 05:47:08 PM »
I assume you'll need to use one of the timer 5 control registers (probably something like TIMSK5) to enable timer 5 overflow interrupts.  Take a look at the datasheet.

- Ben

Offline mbatemanTopic starter

  • Full Member
  • ***
  • Posts: 82
  • Helpful? 0
    • Robotics 4 Fun
Re: Timer Overflow Interrupt not working
« Reply #2 on: October 21, 2008, 06:38:13 PM »
Doh! I knew it was something simple. I poured over so many registers in the datasheet, but somehow missed that one.

Thanks!!!!

-- matt