Yahoo Groups archive

Lpc2000

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

Thread

Internal Watchdog - pros and cons

Internal Watchdog - pros and cons

2004-06-12 by mjbcswitzerland

Hi All

I am thinking about the protection provided by the internal watchdog 
in the LPC210x.

There is a brown-out reset controller on my board which ensure that 
the processor received a good reset when the power supply is turned 
on or dips.

Then I have activated the internal watchdog to reset the processor 
should the software make an error and get stuck in an interrupt 
routine or loop, etc. This seems to work well.

However.... What I do is put a mobile phone right next to the board 
and make a call. The board often dies and it is necessary to remove 
power and reapply it to get it to work again (after removing the 
source of interference). This means that the internal watchdog is 
not really doing its job because I would hope the board to at least 
continue with a reset so that it is not dead until some special 
intervention.

So what is happening? I wonder whether the following may be true:
- The internal watchdog is not active after a reset and it is up to 
the software to start it - which it does. 
- Heavy interference causes the board to fail and the watchdog 
fires, causing the processor to reset.
- The heavy interference is still present and so the processor is 
not running correctly.
- The heavy interference is removed.
- The processor is in an undefined state and so the software is not 
operating correctly and thus didn't restart the watchdog.
- No help comes from the (not activated) watchdog.
- This state remains indefinately (or until someone is called out 
and power cycles the equipment).

If this is indeed correct, the big question is - do I have to use an 
external watchdog after all and what level of protection / garantie 
am I getting from the internal one. In short - is the internal one 
of real use in a critical application?

Any comments or experience??????

Regards

Mark Butcher

www.mjbc.ch

Re: [lpc2000] Internal Watchdog - pros and cons

2004-06-12 by microbit

> If this is indeed correct, the big question is - do I have to use an
> external watchdog after all and what level of protection / garantie
> am I getting from the internal one. In short - is the internal one
> of real use in a critical application?
>
> Any comments or experience??????
>
> Regards
>
> Mark Butcher
Hi Mark,
I'm personally always wary of internal watchdogs for critical
applications, if they only have 1 state with a one shot.
I always prefer an external WD with 2 states or IOW, it expects 0->1
AND 1->0 transitions.
This way ideally you set the ext. watchdog somewhere from a common
point in "foreground", and clear it from a point in say an ISR tick -
something that indicates Interrupts continue to be handled.
If either fails, you get a System reset.
Bear in mind though that with very strong field strengths such as the RF you're
testing with (900 MHz GSM I assume),
an external watchdog probably won't help either.
No CPU I think can be expected to continue correctly with these kind of fields,
if there's sufficient wiring around to pick up the stray RF, rectify it, and severely
shift DC bias all over the place. ONE wire/track attached to MCU about 8 cm long
already makes for a quarter wave "antenna".
There will of course be lots of connections to MCU, so the next thing is to be very
careful with your clock layout. Pickup there is the most disastrous.
The first step for those sort of things would be careful EMI suppression,
control of ESD getting in anywhere in the system, shielding if need be etc.
b rgds
Kris

Re: Internal Watchdog - pros and cons

2004-06-13 by robruth_curtis

Do you have a 'loop forever' debug routine (that you can activate on 
demand) to test if your watchdog is working normally?

If your application is mission (or especially safety) critical, I 
would definitely use an external watchdog. Medical system 
requirements (In Aus anyway) require one. - also pass the reset 
signal through any external fpga or cpld to make sure that still 
works too.

Our micro, a h8 now but the next version an arm 8), has got to be in 
one of the worst environment:- our laser ps switches 900V -1000A in 
20ns! We make sure to have a excellent ground plane and all i/o off 
the board gets a schottky to rail + ground.

That's my experience. I'm keen to hear from the others designing in 
noisy environments.

Rob

Re: Internal Watchdog - pros and cons

2004-07-01 by embyy27

See "USAGE NOTES ON WATCHDOG RESET AND EXTERNAL START" on page 214 of 
the 2124 User Manual (Dated May 03, 2004).  Does this solve your 
problem.

Assuming state of these pins is OK, I had the followin thoughts:

You say that you have to cycle the power to recover.

Did you try activating the Reset pin without removing power?

If your theory about the watchdog reset is correct, then activating 
the Reset pin should recover.  If activating the Reset pin does not 
recover, then the problem is not the watchdog reset.  Rather, the 
chip is getting into some sort of hardware latch-up which requires 
power cycling to recover - if that is true, adding an external 
watchdog (to trigger a reset) will not help you, unless you have the 
external watchdog toggle the power.



--- In lpc2000@yahoogroups.com, "mjbcswitzerland" 
<mjbcswitzerland@y...> wrote:
Show quoted textHide quoted text
> 
> However.... What I do is put a mobile phone right next to the board 
> and make a call. The board often dies and it is necessary to remove 
> power and reapply it to get it to work again (after removing the 
> source of interference). This means that the internal watchdog is 
> not really doing its job because I would hope the board to at least 
> continue with a reset so that it is not dead until some special 
> intervention.
> 
> So what is happening? I wonder whether the following may be true:
> - The internal watchdog is not active after a reset and it is up to 
> the software to start it - which it does. 
> - Heavy interference causes the board to fail and the watchdog 
> fires, causing the processor to reset.
> - The heavy interference is still present and so the processor is 
> not running correctly.
> - The heavy interference is removed.
> - The processor is in an undefined state and so the software is not 
> operating correctly and thus didn't restart the watchdog.
> - No help comes from the (not activated) watchdog.
> - This state remains indefinately (or until someone is called out 
> and power cycles the equipment).
>

Re: Internal Watchdog - pros and cons

2004-07-06 by mjbcswitzerland

--- In lpc2000@yahoogroups.com, "embyy27" <em3yy@e...> wrote:
> See "USAGE NOTES ON WATCHDOG RESET AND EXTERNAL START" on page 214 
of 
> the 2124 User Manual (Dated May 03, 2004).  Does this solve your 
> problem.


I am using the LPC2106 - is this note valid for this type too?



> Assuming state of these pins is OK, I had the followin thoughts:
> 
> You say that you have to cycle the power to recover.
> 
> Did you try activating the Reset pin without removing power?

I am using a simple external brown-out detector without reset 
capability (no push button required) therefore I have to cycle the 
power for a reset. When I get a chance I will verify that the 
hardware is not locked up.

Cheers

Mark Butcher
www.mjbc.ch

Re: Internal Watchdog - pros and cons

2004-07-09 by embyy27

--- In lpc2000@yahoogroups.com, "mjbcswitzerland" 
<mjbcswitzerland@y...> wrote:
> --- In lpc2000@yahoogroups.com, "embyy27" <em3yy@e...> wrote:
> > See "USAGE NOTES ON WATCHDOG RESET AND EXTERNAL START" on page 
214 
> of 
> > the 2124 User Manual (Dated May 03, 2004).  Does this solve your 
> > problem.
> 
> 
> I am using the LPC2106 - is this note valid for this type too?

Not specifically, but you should still need to pay attention to the 
states of P0.14, DBGSEL, and RTCK during the watchdog reset.
 
 
> > Assuming state of these pins is OK, I had the followin thoughts:
> > 
> > You say that you have to cycle the power to recover.
> > 
> > Did you try activating the Reset pin without removing power?
> 
> I am using a simple external brown-out detector without reset 
> capability (no push button required) therefore I have to cycle the 
> power for a reset. When I get a chance I will verify that the 
> hardware is not locked up.
> 

You should be able to test this by just momentarily jumpering the 
RESET pin to ground.  (I assume that the output of your reset/brown-
out chip is short circuit protected.)

As to your earlier question: "In short - is the internal one
of real use in a critical application?," I believe it is not.

In addition to the processor always starting up with reset disabled 
(as you have noted), there is also no protection for over-writing the 
WDTC register (as someone else noted). Writing 0xFFFFFFFF to this 
register would give a watchdog time greater than 19 minutes for a 
typical 14.7456 MHz pclk - vitually worthless in most applications.

I don't understand why Philips bothered to protect the WDEN and
WDRESET bits without protecting the WDTC register!

Re: [lpc2000] Re: Internal Watchdog - pros and cons

2004-07-09 by Robert Adsett

At 10:13 PM 7/9/04 +0000, you wrote:
>--- In lpc2000@yahoogroups.com, "mjbcswitzerland"
><mjbcswitzerland@y...> wrote:

<snip>

>I don't understand why Philips bothered to protect the WDEN and
>WDRESET bits without protecting the WDTC register!

To be fair, they are hardly alone in this.  A lot of microprocessor 
watchdogs allow changing the time period during operation (usually with a 
single write).  It seems to me I've heard that a few even allow the WDT to 
be disabled after it's been enabled but I've not run into those.

They're still useful but not as robust as I would like.

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

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.