2004-03-04 12:34 AM
i can not prevent Watchdog System Reset.
2011-05-17 02:35 AM
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 ]2011-05-17 02:35 AM
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.
2011-05-17 02:35 AM
Execute the following sequence before Watchdog Timer end of count:
spp(WDT_PG); WDTLR = 0xAA; WDTLR = 0x55;