Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] Re: Problem with watchdog

2005-12-11 by Robert Adsett

At 07:10 PM 12/11/05 +0100, Ake Hedman, eurosource wrote:
>The absolute majority of watchdogs, internal or external, function by
>toggling a bit  from time to time. Where in the code  you do this
>toggling is something you have to investigate for each project. The
>common point in any case is that if the program pass a certain point in
>the flow we allow the application to live for n milliseconds more.
>
>The 0xAA, 0x55 sequence is nothing else either. It may look safer then
>toggling a bit but false watchdog triggers have never been a problem for
>an extended time during my years as an embedded developer. The chance
>that your crashed program start to toggle a watchdog bit or write a
>0xAA, 0x55 sequence is just minimal and in that light I think Tom's
>reasoning is fully correct and would not make the watchdogs
>functionality less good. At least IMHO.

Umm minimal chances are what the watchdog is there to protect against.  If 
the chance isn't minimal you can make a very good case that is should be 
covered in your application code and dealt with there.


>But requiring the 0xAA,0x55 sequence is acceptable to of course. The
>need to mask interrupts while doing it is not. Thats really bad.

This is far from unusual.  To quote from the 8xc196MC user manual

"We recommend that you disable interrupts before writing to the watchdog 
register.  If an interrupt occurs between two writes, the watchdog register 
will not be cleared."

The Freescale M68HC11 family acts in the manner you suggest, while the 
ST10/C167 family from ST and Infinion use a single 'protected instruction' 
which is effectively two instructions in series to perform the 
feed.  Effectively ST/Infinion have integrated the feed and interrupt 
protection into a single instruction.  Note that the later family also 
implements Oscillator watchdogs on many of the family members.

Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,   be 
they legal, genetic, or physical.  If you don't believe me, try to chew a 
radio signal. "  -- Kelvin Throop, III
http://www.aeolusdevelopment.com/

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.