This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

WTD Problem

Hi All,

I am trying to add WTD reset to my application.
I am working exactly like keil watchdog example.

The problem is that it looks like the feeding routine is not working properly. I receive wtd reset every although I manage to feed before time.

My WTD routines are:

void WDTInit(unsigned int WDT_time)
{

if (!WDT_time)

WDTC = WDT_TIME_SCALE_VALUE * 1000;

else

WDTC = (WDT_time * WDT_TIME_SCALE_VALUE);

#if DEBUG

WDMOD = WDEN; /* Reset on timer */

#else

WDMOD = (WDEN | WDRESET);

#endif

WDFEED = 0xAA; /* Feeding sequence */

WDFEED = 0x55;
}

void WDTFeed( void )
{

WDFEED = 0xAA;/* Feeding sequence */

WDFEED = 0x55;

}

I will be glad if someone can help

Regards Kobi

0