Yahoo Groups archive

AVR-Chat

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

Message

Re: Watchdog bites

2005-07-29 by arhodes19044

Unfortunately, I have no specific experience with the watchdog 
timer.  But, I have had siginficant trouble with the simulation of 
timers in general, triggering of timer interrupts in the simulator.  
I have tried the simulator for my 128.  Out of frustration I 
eventually set the simulator to mimic the 103 and it worked with 
fewer bugs.

Atmel confirmed the bugs (rather than my own errors) but effectively 
said that they had no timetable for fixes.  

So, one thing you could do is to try setting the simulator to 
emulate some earlier uC that has the same hardware that you are 
using (if it is missing stuff you do not use, then it may not be a 
problem).

This way you might be able to tell if it is a bug in the simulator 
or your own code.

I have essentially given up simulating my code for the 128.  It is 
much too dependent on timers and outside input to do anything 
meaningful in the simulator. Nevertheless, I would have had my life 
made so much easier in the beginning if the simulator worked 
properly.

I would much rather not have certain functions simulated at all, 
rather than have them simulated incorrectly.  Random undocumented 
bugs and errors make the simulator nearly useless IMHO.  

I thin that certain earlier processors have had all the simulator 
bugs eliminated.  BUt not the 128.

-Tony

--- In AVR-Chat@yahoogroups.com, Bruce Parham <obparham@j...> wrote:
> All,
> 
> Thanks for all the comments on bogus op-codes. The boot loader 
code is about done.
> I'm at the point of exiting the loader and starting the 
application code but haven't
> decided which way to go. The original application code was done 
assuming that the cpu
> would startup from a reset though it may work just fine using a 
jump to 0x0000.
> 
> I started playing with the watchdog timer in Studio sim and it 
does work but the timing
> is way off vs the data sheet specs. Enabling the timer with the 
prescaler bits all clear
> should result in a 14-15 ms timeout but Studio sim pops to the 
reset point in something
> under 2 ms. This all may just be a sim bug, like SPM page erase 
and writes only taking
> one clock cycle, no big deal. The other issue, and on this the 
data sheet says nothing,
> is that the WD timer is still enabled after the timer triggered 
reset.
> 
> Does anybody have any insights as to how the real hardware does 
it? Is it still enabled
> after a reset? If it is, I'll need to set the timer for a longer 
period to get through
> the app startup.
> 
> Thanks in advance.
> 
> Bruce

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.