Skip to main content
wkissing
Associate
Mar 4, 2004 8:34 AM UTC
Question

i can not prevent Watchdog System Reset.

Posted on March 04, 2004 at 09:34

i can not prevent Watchdog System Reset.

This topic has been closed for replies.

3 replies

bertrand23
Visitor II
May 17, 2011 9:35 AM UTC
Posted on May 17, 2011 at 11:35

You should have a routine called regularly by a time base (using for example STD Timer) in your Application. You would refresh regularly your Watchdog in this routine.

wkissing
wkissingAuthor
Associate
May 17, 2011 9:35 AM UTC
Posted on May 17, 2011 at 11:35

i have chosed Software Watchdog.

Do i have to use timer interrupt to prevent watchdog system reset in watchdog mode?

My codes below,

void main(void){

spp(WDT_PG); /* select WDT data page */

WDTR = 0x2DF4; /* preset WDTR for 1s */

WDTPR = WDT_PRSC; /* set prescaler value for 1s */

WDTCR = 0; /* Stop timer *Continuous mode */

/* no input/output operation */

WCR = 0; /* enable Watchdog */

while(1){

asm(''nop'');

}

}

According to dataheet, in order to prevent a system reset, the sequence AAh, 55h must be written to WDTLR(Watchdog Timer low Register).

However, i don't know where and how to write AAh, 55h in WDTLR before end of conuter is reached.

Thanks ..i am waiting for cool answers.

[ This message was edited by: annette on 25-02-2004 03:56 ]

lchossat29
Visitor II
May 17, 2011 9:35 AM UTC
Posted on May 17, 2011 at 11:35

Execute the following sequence before Watchdog Timer end of count:

spp(WDT_PG);

WDTLR = 0xAA;

WDTLR = 0x55;