[En-Nut-Discussion] Watchdog Timer

Harald Kipp harald.kipp at egnite.de
Sun Oct 20 12:56:31 CEST 2002


Alexander,

You can use timeouts with most interface functions,
but still a few are left, which may not return fast
enough to retrigger the watchdog.

Reading and, worse, writing to the EEPROM is very
slow. You need to disable the watchdog or write
your own routines containing watchdog triggering.

Connecting a host may require a very long time
on unreliable networks. And accepting connections
is designed not to return until a host connects.

You can rewrite all these API functions and use
timeouts to retrigger the watchdog. But that way
you would run into problems each time the internal
stack routines changes.

I'd recommend to stick with the NutTcp... API calls
and use threads and timers to make your application
behave more asynchronously and less dependant from
network timings. Finding the right points for watchdog
triggering is always difficult. Because Nut/OS uses
cooperate threading (non preemptive), the major
pitfall is to run in an endless loop, triggering the
watchdog and never passing control to other threads.

Harald


At 12:41 15.10.02 -0400, you wrote:
>Hello, Harald.
>I have to design a system, which is not going to be serviced. As I have
>understood, some Ethernut functions have rather long inner waiting time
>(correct me if I'm wrong). Does it mean, that I cannot use AVR watchdog to
>avoid dead loops?
>Alexander Baranov
>Intech21, Inc.
>50 Glen Street,
>Glen Cove, NY, 11542
>www.intech21.com
>
>
>_______________________________________________
>En-Nut-Discussion mailing list
>En-Nut-Discussion at egnite.de
>http://www.egnite.de/mailman/listinfo/en-nut-discussion




More information about the En-Nut-Discussion mailing list