cancel
Showing results for 
Search instead for 
Did you mean: 

i can not prevent Watchdog System Reset.

wkissing
Associate II
Posted on March 04, 2004 at 09:34

i can not prevent Watchdog System Reset.

3 REPLIES 3
wkissing
Associate II
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 ]

bertrand23
Associate II
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.

lchossat29
Associate II
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;