problem with avrstudio simulation of timer interrupts
2005-04-18 by arhodes19044
As you may have seen from other posts, I am trying to write (and then simulate) timer functions. Currently I have 2 timers running. Timer 1 runs at a prescale of 1 and trivvers an output compare avery 16,000 counts (1 millisecond). When this runs as the only timer process, it works fine. I have also set up timer 0 as a slower timer. Prescale is 1024 and it triggers at close to 61hz. I have set up the overflow interrupt for this one and it works properly when it, too, triggers properly. When the 2 timers are running simultaneously then I get the timer 1 output compare triggering the timer2 overflow function (I can't tell if the code is jumped to, or if there was an interrupt to get there). It may be a problem with avrstudio and stepping thru a program, or maybe with the avr-libc that I am using for the timer128.c routines. Any suggestions? -Tony