I am sorry if I mis-typed. It is TC1A triggering a TC0 interrupt. I have not tested this on the ATmega128, because I just got it today, and I am waiting for my ICE-cube which will arrive in a day or 2. It has got to be a simulator issue. I agree that only one interrupt will get triggered for an individual timer function. It is just that I can clearly see the TC0 overflow interrupt get set as the TC1A OC interrupt is cleared. I tried to use TC1B, and that will not even get the TC1 counter counting when I enable TC1B. If I only change to code to enable TC1A, then the counter runs perfectly! I have not seen any posts about timer simulation problems in the newest version of AVRStudio, but there have been issues for various ATmega device timer simulations in the past. I suppose these have yet to be resolved. oh well. I will get my ATmega programmed asap. I am using the MAvric-IIb board. -Tony --- In AVR-Chat@yahoogroups.com, "airmaledfw" <airmaledfw@h...> wrote: > > --- In AVR-Chat@yahoogroups.com, "arhodes19044" <spamiam@c...> wrote: > > > > 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). > > > Tony, > > It isn't possible for a timer1 OC to trigger a timer2 interrupt > service routine. When an interrupt occurs (and it's interrupt flag > is enabled) and interrupts are also globally enabled, the AVR vectors > to an address reserved for that interrupt. At that address, another > address will be found which is placed there by your compiler. This > is the memory address at which the compiled interrupt service routine > has been placed. Guessing that your code is written as standard > interrupt service routines are, the only "normal" way to get there > would be through an actual interrupt (not a "jump" or "goto" > unrelated to an interrupt). > > What chip are you working with (this will help with register > identification) and does it have JTAG? Perhaps this > is just a simulation issue (as you suggest) and not a real world > issue.
Message
Re: problem with avrstudio simulation of timer interrupts
2005-04-20 by arhodes19044
Attachments
- No local attachments were found for this message.