This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: watchdog - powerpc


On Fri, 2003-05-23 at 03:40, Jonathan Larmour wrote:
> Bob Koninckx wrote:
> > Powerpc _enables_ the watchdog by default. According to the hardware
> > manual you can only disable it out of reset but never re-enable it
> > afterwards.
> > 
> > from the spec ... SYPCR
> > 
> > This register can be read at any time but can be written only once after
> > system reset ...
> > 
> > I do not think you want a watchdog in redboot. But then redboot needs to
> > disable it, meaning you can not use it in the application afterwards
> > either. On the other hand, leaving it enabled in redboot gives the
> > application a chance to decide. But then you'll end up having problems
> > in redboot if you do not start the application fast enough. Am I missing
> > something ?
> 
> Have the HAL provide a default NO-OP watchdog exception handler that acks 
> the watchdog (or whatever's required)? An application or watchdog device 
> driver can then override as required just by overriding the exception.

mmm ... Not really an option. You can indeed choose between either a
reset of the board or an interrupt upon watchdog timeout. But if you go
for the interrupt, there's no way of changing it to reset afterwards.
And I want the reset! Damn write once register :-(

Can you make use of interrupts in redboot? I tought they're all
disabled?

> 
> Or arguably just write a standard watchdog device driver (as lives in 
> devs/watchdog and uses io/watchdog) and include it in the RedBoot 
> image.... and if CYGPKG_IO_WATCHDOG isn't defined in <pkgconf/system.h> 
> just disable the watchdog entirely in SYPCR.

That's what I planned to do. I was just looking for a way to avoid this
kind of coupling between redboot and the application. Because of the
write-once nature of the SYPCR register and the watchdog being enabled
by default, redboot and the application can not decide independently on
the use of a watchdog.

Thanks,
Bob

> 
> Jifl
> -- 
> eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
> --[ "You can complain because roses have thorns, or you ]--
> --[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine
-- 
----------------------------------------------------------------------
ir. Bob Koninckx
Katholieke Universiteit Leuven
Division Production Engineering,                   tel.  +32 16 322535
Machine Design and Automation                      fax.  +32 16 322987
Celestijnenlaan 300B                  bob.koninckx@mech.kuleuven.ac.be
B-3001 Leuven Belgium               http://www.mech.kuleuven.ac.be/pma
----------------------------------------------------------------------


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]