Yahoo Groups archive

Lpc2000

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

Thread

Watchdog problem

Watchdog problem

2004-03-23 by Helge Fabricius-Hansen

Hi!

I tried to use the watchdog, but it looks like I can't set a long 
timeout or it ignores my kicking.
I am getting a reset right away...


WDTC = 7500000L;  // Set for ca. 2 seconds at 60 MHz and devide by 4
WDMOD = 0x03;

while(1)
  {
  WDFEED = 0xAA; WDFEED = 0x55;
  bla.
  bla.
  etc.

  // looptime not more then 10 ms

  }

Anyone with a clue?

//Helge

Re: [lpc2000] Watchdog problem

2004-03-23 by Robert Adsett

At 06:19 PM 3/23/04 +0000, you wrote:
>I tried to use the watchdog, but it looks like I can't set a long
>timeout or it ignores my kicking.

Does that mean it works for shorter times?

>I am getting a reset right away...
>
>
>WDTC = 7500000L;  // Set for ca. 2 seconds at 60 MHz and devide by 4

Hmm, one of us is doing the arithmetic wrong here :)  I get 0.5 seconds.  A 
count of 15000000 would give 1 second.  Curiously there is no protection 
against modifying this register in the LPC (a bit of a weakness IMHO).

>WDMOD = 0x03;
>
>while(1)
>   {
>   WDFEED = 0xAA; WDFEED = 0x55;

You do have WDFEED declared as volatile?  The fact you get a reset does 
suggest it's get fed properly at least once.

>   bla.
>   bla.
>   etc.
>
>   // looptime not more then 10 ms

Have you checked to make sure the loop is in fact executing multiple times 
before the reset?


>   }

More questions than answers at the moment, I'm afraid.

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

Re: Watchdog problem

2004-03-24 by slawcus

--- In lpc2000@yahoogroups.com, "Helge Fabricius-Hansen"
<helge.fabricius@t...> wrote:
> Hi!
> 
> I tried to use the watchdog, but it looks like I can't set a long 
> timeout or it ignores my kicking.
> I am getting a reset right away...
> 
> 
> WDTC = 7500000L;  // Set for ca. 2 seconds at 60 MHz and devide by 4
> WDMOD = 0x03;
> 
> while(1)
>   {
>   WDFEED = 0xAA; WDFEED = 0x55;
>   bla.
>   bla.
>   etc.
> 
>   // looptime not more then 10 ms
> 
>   }
> 
> Anyone with a clue?
> 
> //Helge


Can you post asembler listing for that part?

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.