[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Q: Adding WDT support.

joel at OARcorp.com wrote:

> On Fri, 30 Jul 1999, erik.ivanenko wrote:
> > I have the pc386 BSP running on an ACER PIA-632.  This uses a 386sx-40
> > clone chip.  It is an embeddable device, that sits in an ISA backplane,
> > and has floppy and hd controller ports among other things.  It uses the
> > AMI bios, and is completely PC compatible ( as far as I can tell ).
> >
> > It does however, include a watchdog timer ( WDT ) , which makes it
> > different from a PC.  The WDT
> > is supposed to be initialized at the beginning of the application code
> > proper, and reset periodically during the application. It is required
> > ONLY by the application.
> >
> > My question is:
> >
> > Where should I locate the WDT control source code?  It does not belong
> > in the pc386 BSP, as the existence of the WDT is specific to the
> > acer-pia-632.  It seems silly to copy the pc386 BSP code just to make
> > another BSP that includes the WDT control library -- as applications may
> > not even use the WDT!
> >
> > Should a new BSP be created, or should  the optional WDT control library
> > be included with pc386?
> There are a couple of approaches to this type of problem.  Which is
> appropriate depends on how reusable that WDT really is.
> (1) If the WDT corresponds to a standard WDT that I could buy an ISA card
> for and reuse the driver, then it is a VERY optional part of the pc386 BSP
> which is left out by the linker unless referenced.  This is easy.

I don't know how "standard" these things are.  The ACER board docs claim that
the rtc is ds12887 compatible, but only up to a point.  This chip also has a
square wave generator, that can trigger interrupts.

# Enable the square wave output on the ACER

outb $0x0B, 0x70  # for the ds12887, this is done @ IO port 0x71 ( register

# set frequency of SQW generator using register B ( always 1024  on the ACER)

 outb $0x0A, 0x71 # for the ds12887, this is done @ IO port 0x71, with outb
data = 0x06

# enable WDT and set timeout on the ACER ( 0x09, 0x0a 0x0b 0x0c 0x0d 0x0e 0xf
= 32 16 8 ... 0.5 secs )

 outb $0A, 0xF2  # Nothing like this on the ds12887.

Is this like other ISA based WDTs or is it unique?  How do they do these

> (2) If on the other hand it is strictly specific to the Acer box, then you
> may want to think in terms of the Acer being either a variation on the
> pc386 which adds that driver (mvme162 vs. mvme162lx) or a separate BSP
> that (for the most part) picks up its source code from the pc386 BSP using
> either VPATH or cd'ing into that tree and building it.
> If you feel that (2) is a more appropriate view then we need to get Ralf's
> opinion on how to view BSPs like this given the move to automake.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: vcard.vcf
Type: text/x-vcard
Size: 291 bytes
Desc: Card for Erik Ivanenko
Url : http://rtems.rtems.org/pipermail/rtems-users/attachments/19990730/9aeae98a/attachment.vcf