2008-11-25 15:11:08 uClinux Watchdog
Silver Pine (UNITED STATES)
Message: 65797
The uClinux OS running on my device has the folder "/dev/watchdog".
Also, when I execute a "ps -a" command, I see the "6 root SW [watchdog/0]".
When I build, execute, load onto the device, and run the "watchdog-simple" applicaiton, the following error is reported:
watchdog: No such device
This was an attempt to see if the "watchdog-simple" application would enable the watchdog and reset it every so often.
I'm unclear as what settings need to be selected in the "make menuconfig" to use the watchdog. Is it just the "watchdog simple deamon" that needs to be selected? Or are there other selections in "make menuconfig" releated to the watchdog? And why does the "watchdog: No such device" error message appear? This message appears after an attempt to open the device using the "int fd = open("/dev/watchdog", O_WRONLY);". When I change the directory to /dev on the device, I see that the "watchdog" is present in the file list using the "ls -l" command. The code is shown below:
#include
<stdio.h>
#include
<stdlib.h>
#include
<unistd.h>
#include
<fcntl.h>
int
{
perror(
exit(EXIT_FAILURE);
}
ret = write(fd,
ret = -1;
}
ret = fsync(fd);
sleep(10);
}
close(fd);
}
main(void)int fd = open("/dev/watchdog", O_WRONLY);int ret = 0;if (fd == -1) {"watchdog");while (1) {"\0", 1);if (ret != 1) {break;if (ret)break;return ret;
QuoteReplyEditDelete
2008-11-25 18:11:16 Re: uClinux Watchdog
Robin Getz (UNITED STATES)
Message: 65802
Wayne:
Have a look at:
http://docs.blackfin.uclinux.org/doku.php?id=watchdog
It points you to the right places.
-Robin