> I was wondering if anyone might know what options might be
candidates to
> implement a watchdog timer?
>
> I'm working on a new PC Board layout so I pretty much have total
control
> on the hardware side of things. What I was looking for was feedback
from
> all the "software types" out there as far as what their preferred
> strategy would be.

A small chip like a basic-stamp or any of those cheap HP programmable
controller chips ($5 ea) would be fine, I
would think. That way you wouldn't have to limit it to only being a
simple timer. We've found a few different
ways to control our watchdogs:

1. On systems with an incoming phone line, we wait for incoming ring
detection, and reset our controller if it
fails to answer the phone. This works whether the modem and phone line
are landline or cellular.

2. We prefer a settable watchdog interval, since some hardware
manufacturers have hardcoded their watchdog to
approx 1 second intervals, this can be too little, especially when
complex Flash ROM rewriting operations can
take several seconds to complete.  We poll an I/O Address (ie:
inportb(0x100) ) every second to strobe the
watchdog timer and reset it's counter.  To enable it we write a
nonzero value to 0x100 which the controller
reads and interprets as the watchdog interval. When we write a 0 it
disables the watchdog. It is disabled
during our PC BIOS bootup and during the OS boot. Once the OS is
booted we re-enable it.

3. We have an external defeat switch ( a jumper you can pull ) that
will defeat the watchdog, so that we can
easily isolate watchdog reboots from other kinds of lockups or
unexpected system reboots.

We have built a few prototypes of our PC-104 form factor hardware
watchdog, using a little chip that one of our
engineers found that costs about $5, and can be programmed in a
pseudo-BASIC language (really it's a prettied-up assembly language)
and can take a few hundred lines of pseud-BASIC code to do it's
programming. The nice thing is that we burn
the instructions into them, and we pop them in a DIP socket, and if we
ever have to change our watchdog behaviour, it just
costs $5 to replace the chip, rather than rebuilding our watchdog
board layout. Personally I'd like to add some external
relay lines to our watchdog as well, so that we can turn off any
external devices that stop responding to the controller. For example,
we have lots of problems with external modems "going stupid",
especially if they are based on a US Robotics chipset.
It would be nice if our CPU could turn the modem's power off and on
again if the modem stops responding. We have so much fun with modems
and other external communications hardware. There's quite a bit of
room left on our PC-104 board for this.

In your case it looks like you're doing an "all in one" PC board
design.  In most applications that we do, we prefer to build our own
PC-104 style I/O and accessory boards, and then drop a standard PC-104
CPU on top. No muss no fuss, and for low quantity like we do, it's
more economical in our case than a Rolling Our Own Motherboard. But
I'd really love to roll my own motherboard some day. It sure sounds
like fun.  (I'm not even the hardware guy, I'm just the firmware guy.)

Warren

Reply via email to