Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: problem with avrstudio simulation of timer interrupts

2005-04-20 by arhodes19044

I just tried to set AVR studio to emulate the AVR103  It WORKED JUST 
FINE.  Clearly there are issues with the emulation of the timer 
functions in the 128 simulation.

I am very relieved.  It was SUPPOSED to work right. Because I had 
thought long and hard about the code.  That is supposed to make 
perfect code, right?!

At least I know I am not insane.  The timer _do_ work the way they 
are supposed.  This weekend I will get the real 128 working!  I will 
get it to flash little LEDs at certain rates!

-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.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.