Yahoo Groups archive

Lpc2000

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

Thread

LPC2138 Watchdog

LPC2138 Watchdog

2005-01-27 by tah2k

When enabled and timed out, the LPC2138 watchdog with generate an 
interrupt and may cause a reset depending on the state of 
WDMOD:WDRESET bit.

I can see the interrupt being useful during debugging when the reset 
is disabled, but does it serve any purpose when the reset is 
enabled? Would the ISR even get serviced if the watchdog times out 
and a reset is forced?

Re: LPC2138 Watchdog

2005-01-27 by Rick Collins

--- In lpc2000@yahoogroups.com, "tah2k" <tah2k@y...> wrote:
> 
> When enabled and timed out, the LPC2138 watchdog with generate an 
> interrupt and may cause a reset depending on the state of 
> WDMOD:WDRESET bit.
> 
> I can see the interrupt being useful during debugging when the reset 
> is disabled, but does it serve any purpose when the reset is 
> enabled? Would the ISR even get serviced if the watchdog times out 
> and a reset is forced?

I think the idea is that you can either reset the chip, or you can 
use the interrupt.  I don't know why you would use the interrupt 
instead of the reset, but I have seen PC based embedded systems that
use a normal timer interrupt as a watchdog when no watchdog hardware
was available.  It was more of a way to detect that one of the tasks
was not responding.

Re: LPC2138 Watchdog

2005-01-27 by lpc2100_fan

--- In lpc2000@yahoogroups.com, "Rick Collins" <gnuarm@a...> wrote:
> 
> --- In lpc2000@yahoogroups.com, "tah2k" <tah2k@y...> wrote:
> > 
> > When enabled and timed out, the LPC2138 watchdog with generate an 
> > interrupt and may cause a reset depending on the state of 
> > WDMOD:WDRESET bit.
> > 
> > I can see the interrupt being useful during debugging when the reset 
> > is disabled, but does it serve any purpose when the reset is 
> > enabled? Would the ISR even get serviced if the watchdog times out 
> > and a reset is forced?
> 
> I think the idea is that you can either reset the chip, or you can 
> use the interrupt.  I don't know why you would use the interrupt 
> instead of the reset, but I have seen PC based embedded systems that
> use a normal timer interrupt as a watchdog when no watchdog hardware
> was available.  It was more of a way to detect that one of the tasks
> was not responding.

Hi,
using the watchdog with interrupt has two options, you use it as a
periodic timer interrupt or for debugging, if it ever hits you know
that your application is not feeding the watchdog frequently enough.

For the reset, this should be default in a running and debugged
application. The idea behind the watchdog is that e.g. your main loop
services the watchdog and if your program execution becomes undefined
the program will not longer return to the lowest priority main loop.
The only way to get out is probably a reset. This is what the WDT will do.

hth Bob

Re: LPC2138 Watchdog

2006-03-16 by rekerj@duerkopp-adler.com

Hi, 

how can I use the watchdog as a periodic timer? 

>using the watchdog with interrupt has two options, you use it as a  
>periodic timer interrupt or for debugging,...

The information i've found in the manual is:
"The Watchdog Interrupt Flag is set when the watchdog times out. This flag is cleared when any reset occurs."

Due to this it isn't possible to clear the Watchdog Interrupt Flag by software. But when I can't clear this flag, I can handle this interrupt only one time and that wouldn't be sense of a periodic timer.

Juergen

Re: LPC2138 Watchdog

2006-03-16 by Jayasooriah

Hi Juergen,

You cannot use the watchdog as a periodic timer interrupt because on 
watchdog interrupt the CPU is reset almost equivalent to an external reset.

Jaya

--- In lpc2000@yahoogroups.com, rekerj@... wrote:
 >
 > Hi,
 >
 > how can I use the watchdog as a periodic timer?
 >
 > >using the watchdog with interrupt has two options, you use it as a
 > >periodic timer interrupt or for debugging,...
 >
 > The information i've found in the manual is:
 > "The Watchdog Interrupt Flag is set when the watchdog times out. This 
flag is cleared when any reset occurs."
 >
 > Due to this it isn't possible to clear the Watchdog Interrupt Flag by 
software. But when I can't clear this flag, I can handle this interrupt 
only one time and that wouldn't be sense of a periodic timer.
 >
 > Juergen

Send instant messages to your online friends http://au.messenger.yahoo.com

Re: LPC2138 Watchdog

2006-03-16 by Guillermo Prandi

Jaya: the LPC allows you to choose between reset and interrupt when 
Watchdog is triggered by means of the WDMOD register. If you set 
WDMOD to 0x01, you'll get a normal IRQ through the VIC when the 
watchdog is triggered; if you set it to 0x03, you will get a reset 
(which is similar to a hardware reset).

Guille

--- In lpc2000@yahoogroups.com, Jayasooriah <jayasooriah@...> wrote:
>
> Hi Juergen,
> 
> You cannot use the watchdog as a periodic timer interrupt because 
on 
> watchdog interrupt the CPU is reset almost equivalent to an 
external reset.
> 
> Jaya
> 
> --- In lpc2000@yahoogroups.com, rekerj@ wrote:
>  >
>  > Hi,
>  >
>  > how can I use the watchdog as a periodic timer?
>  >
>  > >using the watchdog with interrupt has two options, you use it 
as a
>  > >periodic timer interrupt or for debugging,...
>  >
>  > The information i've found in the manual is:
>  > "The Watchdog Interrupt Flag is set when the watchdog times out. 
This 
> flag is cleared when any reset occurs."
>  >
>  > Due to this it isn't possible to clear the Watchdog Interrupt 
Flag by 
> software. But when I can't clear this flag, I can handle this 
interrupt 
> only one time and that wouldn't be sense of a periodic timer.
>  >
>  > Juergen
> 
> Send instant messages to your online friends 
http://au.messenger.yahoo.com
>

Re: [lpc2000] Re: LPC2138 Watchdog

2006-03-16 by K B Shah-lascaux

Hi,
Philips Semiconductors Preliminary User Manual

LPC2119/2129/2194/2292/2294 ARM-based Microcontroller

Watchdog Mode Register (WDMOD - 0xE0000000)

The WDMOD register controls the operation of the Watchdog as per the combination of WDEN and RESET bits.

WDEN WDRESET

0 X Debug/Operate without the Watchdog running

1 0 Debug with the Watchdog interrupt but no WDRESET

1 1 Operate with the Watchdog interrupt and WDRESET

Once the WDEN and/or WDRESET bits are set they can not be cleared by software. Both flags are cleared by an external reset

or a Watchdog timer underflow.
Show quoted textHide quoted text
----- Original Message ----- 
  From: Guillermo Prandi 
  To: lpc2000@yahoogroups.com 
  Sent: Thursday, March 16, 2006 12:36 PM
  Subject: [lpc2000] Re: LPC2138 Watchdog


  Jaya: the LPC allows you to choose between reset and interrupt when 
  Watchdog is triggered by means of the WDMOD register. If you set 
  WDMOD to 0x01, you'll get a normal IRQ through the VIC when the 
  watchdog is triggered; if you set it to 0x03, you will get a reset 
  (which is similar to a hardware reset).

  Guille

  --- In lpc2000@yahoogroups.com, Jayasooriah <jayasooriah@...> wrote:
  >
  > Hi Juergen,
  > 
  > You cannot use the watchdog as a periodic timer interrupt because 
  on 
  > watchdog interrupt the CPU is reset almost equivalent to an 
  external reset.
  > 
  > Jaya
  > 
  > --- In lpc2000@yahoogroups.com, rekerj@ wrote:
  >  >
  >  > Hi,
  >  >
  >  > how can I use the watchdog as a periodic timer?
  >  >
  >  > >using the watchdog with interrupt has two options, you use it 
  as a
  >  > >periodic timer interrupt or for debugging,...
  >  >
  >  > The information i've found in the manual is:
  >  > "The Watchdog Interrupt Flag is set when the watchdog times out. 
  This 
  > flag is cleared when any reset occurs."
  >  >
  >  > Due to this it isn't possible to clear the Watchdog Interrupt 
  Flag by 
  > software. But when I can't clear this flag, I can handle this 
  interrupt 
  > only one time and that wouldn't be sense of a periodic timer.
  >  >
  >  > Juergen
  > 
  > Send instant messages to your online friends 
  http://au.messenger.yahoo.com
  >






  SPONSORED LINKS Microcontrollers  Microprocessor  Intel microprocessors  
        Pic microcontrollers  


------------------------------------------------------------------------------
  YAHOO! GROUPS LINKS 

    a..  Visit your group "lpc2000" on the web.
      
    b..  To unsubscribe from this group, send an email to:
     lpc2000-unsubscribe@yahoogroups.com
      
    c..  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


------------------------------------------------------------------------------




------------------------------------------------------------------------------


  No virus found in this incoming message.
  Checked by AVG Free Edition.
  Version: 7.1.385 / Virus Database: 268.2.3/281 - Release Date: 14/03/2006


[Non-text portions of this message have been removed]

Re: LPC2138 Watchdog

2006-03-16 by Jayasooriah

Thanks Guile and Shah-lascaux.  Yes the watchdog on LPC has features that 
allows it to be used just as an interval timer.  There is your answer Jurgen.

>Message: 5
>    Date: Thu, 16 Mar 2006 13:29:30 -0500
>    From: "K B Shah-lascaux" <kbshah@...>
>Subject: Re: Re: LPC2138 Watchdog
>
>Hi,
>Philips Semiconductors Preliminary User Manual
>
>LPC2119/2129/2194/2292/2294 ARM-based Microcontroller
>
>Watchdog Mode Register (WDMOD - 0xE0000000)
>
>The WDMOD register controls the operation of the Watchdog as per the 
>combination of WDEN and RESET bits.
>
>WDEN WDRESET
>
>0 X Debug/Operate without the Watchdog running
>
>1 0 Debug with the Watchdog interrupt but no WDRESET
>
>1 1 Operate with the Watchdog interrupt and WDRESET
>
>Once the WDEN and/or WDRESET bits are set they can not be cleared by 
>software. Both flags are cleared by an external reset
>
>or a Watchdog timer underflow.
>
>----- Original Message -----
>   From: Guillermo Prandi
>   To: lpc2000@yahoogroups.com
>   Sent: Thursday, March 16, 2006 12:36 PM
>   Subject: [lpc2000] Re: LPC2138 Watchdog
>
>
>   Jaya: the LPC allows you to choose between reset and interrupt when
>   Watchdog is triggered by means of the WDMOD register. If you set
>   WDMOD to 0x01, you'll get a normal IRQ through the VIC when the
>   watchdog is triggered; if you set it to 0x03, you will get a reset
>   (which is similar to a hardware reset).
>
>   Guille
>
>   --- In lpc2000@yahoogroups.com, Jayasooriah <jayasooriah@...> wrote:
>   >
>   > Hi Juergen,
>   >
>   > You cannot use the watchdog as a periodic timer interrupt because
>   on
>   > watchdog interrupt the CPU is reset almost equivalent to an
>   external reset.
>   >
>   > Jaya

Send instant messages to your online friends http://au.messenger.yahoo.com

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.