ts-7000
[Top] [All Lists]

Re: [ts-7000] Re: Watchdog write failure while reading/writing to ttts5

To:
Subject: Re: [ts-7000] Re: Watchdog write failure while reading/writing to ttts5
From: Eric Robishaw <>
Date: Fri, 11 Sep 2009 15:31:28 -0500


I have a thread that every 3 seconds calls a library function that attempts to feed it for up to 1000 tries, pauses 500ms, and makes the lib call again (3x total).  If it fails at that point (3000 total attempts), I then shutdown my app ASAP. I also go ahead and restart the OS, just in case the watchdog fails to do so.

I had mistakenly taken out the usleep(1) between each of the 1000 tries... I have put the usleep(1) back in and have now gone for about 18 hours without any mishaps.  I think that should solve it.  Its either that, or the fact that I'm now running from mtd instead of the sd card, which could have been the bigger issue.

I still wish there were a bigger than 8s timeout available!  I can see how a 250ms timeout would be useful in an embedded process, but with a full linux app, there's no practical use for it, unless you're running from read only filesystem. If there are only 4 bits available for the setting, I'd rather see {off, 2s, 8s, 16s}, or even {off, 2s, 16s, 32s}  or maybe {off, 2s, 8s, 64s} than the current offering {off, 250ms, 2s, 8s}. 

Eric







On Fri, Sep 11, 2009 at 2:47 PM, PeterElliot <> wrote:
 

Hi Eric,

How ofter are you feeding the watchdog?

In my application I'm feeding the watchdog very frequently, with an 8s timeout. I would need to miss hundreds/thousands of feeds one after another to have an issue.

Regards,

PJE



--- In ts-7000%40yahoogroups.com, "eric.robishaw" <> wrote:
>
> --- In ts-7000%40yahoogroups.com, Kevin Cozens <kevin@> wrote:
> >
> > On 09/11/2009 02:34 AM, eric.robishaw wrote:
> > > I keep getting failure feeding the watchdog during serial activity
> > > on ttts5...
> > [snip]
> > > It only happens about 1/500 times, but when it does fail, I have to
> > > assume that the watchdog feed failure is going to immanently cause a
> > > reboot, so I quickly shutdown my app when I fail to feed the dog.
> >
> > If the timer was set to 1 minute and you only feed it once a minute, you
> > could be in danger of a reboot. If the timer was set to 5 minutes and
> > you fed it every 1 minute, you could miss 3 or 4 feeding times and still
> > be ok.
> >
> > --
> >
> > Cheers!
> >
> > Kevin.
> >
> > http://www.ve3syb.ca/ |"What are we going to do today, Borg?"
> > Owner of Elecraft K2 #2172 |"Same thing we always do, Pinkutus:
> > | Try to assimilate the world!"
> > #include <disclaimer/favourite> | -Pinkutus & the Borg
> >
>
>
> That would be great if the watchdog could go that long, but as I understand it, the max timeout is 8 seconds.
>
> That means if I miss for more than 3 seconds, I only have 5 seconds in which to quickly shutdown my app and close files before the restart.
>
> Is it possible there is more than an 8second timeout? the documentation on the watchdog is completely lacking (documentation >> NULL) well, unless you count "Run ts7800ctl with no arguments for an explanation of usage" as documentation. The ts7800ctl only shows how to set,disable and feed, and the only feed values specified are 250ms, 2s and 8s.
>
> #define WDT_OFF 0
> #define WDT_250ms 1
> #define WDT_2s 2
> #define WDT_8s 3
>
> Should I infer that every increment of WDT_n will quadruple the timeout?
>
> Does a value of 4 = 32s, 5=128s, 6=512s ???
>
> Or is the maximum limit 8s?
>
>
> Eric
>




__._,_.___


Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: =Email Delivery: Digest | m("yahoogroups.com?subject","ts-7000-fullfeatured");=Change Delivery Format: Fully Featured">Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | =Unsubscribe

__,_._,___
<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU