I'm using PTXdist 2012.12 with a Mini2440. I initialize and kick the
watchdog from my Qt application. It used to work fine with kernel 2.6.38
but now with kernel 3.7 I get the following error:
watchdog watchdog0: watchdog did not stop!
This is the code I use to initialize and kick the dog:
//******************************************************************************
**
// Watchdog constructor
//******************************************************************************
**
cWatchdog::cWatchdog(cSystem *fSystem)
{
  WatchDogTimeout = 30;
  System = fSystem;
  QObject::connect(this, SIGNAL(signalAddStatusText(QString)),
System->GUI->StatusDialog, SLOT(AddStatusText(QString)));
  emit signalAddStatusText("Watchdog initialization");
  // Try and get a handle to the watchdog
    WatchdogHandle = open("/dev/watchdog", O_WRONLY);
  // If the handle is not valid
  if (WatchdogHandle < 0)
  {
    perror("Could not get a handle to watchdog");
    return;
  }
  // Set the watchdog timeout
  ioctl(WatchdogHandle, WDIOC_SETTIMEOUT, &WatchDogTimeout);
  emit signalAddStatusText("Watchdog timeout set to 30sec");
  // Kick the dog
  KickTheDog();
}
//******************************************************************************
**
// Kicks the watchdog (wakey, wakey)
//******************************************************************************
**
void cWatchdog::KickTheDog(void)
{
    // Kick the dog
  write(WatchdogHandle, "V", 1);
}
  
