Hi all, I have a weird problem. I will feed hardware watchdog every 10s for many hours (5-26 hours) without a problem and then the board will reset. The code to feed the watchdog will execute just fine, but watchdog will reset anyway. This is the c# code that feeds watchdog: FileStream _stream = new FileStream("WDT1:", FileMode.Open); _stream.WriteByte(1); _stream.Close(); _log.Debug("Fed Watchdog"); And this is the code that gets called in wdt.dll (slightly changed from original WDT driver): DWORD WDT_Write(DWORD hOpenContext, LPCVOID pSourceBytes, DWORD NumberOfBytes) { RETAILMSG(1,(TEXT("WDT: Write\r\n"))); unsigned char * pBytes = (unsigned char *) pSourceBytes; if (pSourceBytes == NULL) { DisableReset(); RETAILMSG(1,(TEXT("WDT: pSourceBytes == NULL\r\n"))); } else if (pBytes[0] == 0) { DisableReset(); RETAILMSG(1,(TEXT("WDT: pBytes[0] == 0\r\n"))); } else { FeedIt(); RETAILMSG(1,(TEXT("WDT: pBytes[0] != 0\r\n"))); } return TRUE; } Any ideas what is happening here? Thank you, Andreja
Watchdog restarts the board despite feeding
Hi Andreja, doing exactly the same thing (same C# code) and feeding it every 10 sec. I have no problem over days and months... So there must be problem somerwhere else in your code or your hardware? Is your code really feeding the watchdog at the time the restart happens? Regards Carsten