Re: Watchdog that should be taken out and shot
- From: "Tom Lucas" <news@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 14 Sep 2006 10:52:16 +0100
"Peter Dickerson" <first{dot}surname@xxxxxxxxx> wrote in message
news:5aXNg.17075$SH2.4122@xxxxxxxxxxxxxxxxxxxxxxx
"Tom Lucas" <news@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote
in
message news:1158161579.6562.0@xxxxxxxxxxxxxxxxxxxxxxxxx
I've been trying to implement the watchdog timer on my Sharp79524 and
it
appears that the mutt is sleeping on the job!
I'm using a 75410, which has a watchdog that looks the same. I don't
use it
because it is only any use in faulty software and if I had faulty
software
why would I expect the watchdog code to be any better. However, I can
test
it out.
Of course, my software is perfect and can never fail so I only need the
watchdog in case of alien death rays ;-)
I believe I have it set up to trigger after about 3s of inactivity
but
it doesn't seem to reset the system at all.
My setup method is as follows:
1) Write 0x00000090 to the watchdog CTL to set up for 2^25 counts of
HCLK as the timeout period. This also stops an interrupt on first
timeout occurring and should set up for an immediate reset. Watchdog
not
enabled at this point
For me 2^25 counts is 0.65 seconds.
Maybe my maths is a bit off but even at 0.65s then I would expect it to
reset - even if I expected it to take longer.
2) Write 0x1984 to the watchdog RST register to seed the counter.
(Goodness knows why they chose that value)
3) OR 0x00000001 onto the CTL register to enable the watchdog.
4) OR 0x00000008 onto the CTL regsiter to lock the enable.
Yep, reset after a fraction of a second. Using a larger period gave
the
expected results.
Didn't happen for me :-( Is there something in the RCPC registers that
needs to be set before watchdogs have any bite? Is there anything that
can stop them?
Then I periodically write Ox1984 to the RST register to keep
everything
alive.
Then if I encounter a while(1); that I've planted somewhere then the
system hangs but no reset ever happens.
Is there something I've missed? The watchdog section of the user
guide
was only a few pages so it would appear to be "simple" but perhaps
there
are other things that affect it's operation?
I've tried running under the debugger and also stand-alone from flash
in
case that made any difference but it doesn't seem to.
Any ideas?
I poked 0x90, 0x91 and 0x98 rather than oring but other...
Peter
Hold on I'll try......nope, didn't work.
Perhaps there is something in the hardware that can prevent a WDT?
Perhaps I have a disabling pin activated or something but I'm not aware
of any that it could be.
.
- References:
- Watchdog that should be taken out and shot
- From: Tom Lucas
- Re: Watchdog that should be taken out and shot
- From: Peter Dickerson
- Watchdog that should be taken out and shot
- Prev by Date: Graphic libraries for vxWorks
- Next by Date: Re: LH7A400 Evaluation Board
- Previous by thread: Re: Watchdog that should be taken out and shot
- Next by thread: Re: Watchdog - all is forgiven
- Index(es):