R
ryanHo
Guest
I would like to trigger the WatchDog Timer from my system(Intel QM67 platform),what is the sample code/command to do so?
Please advise.
Thanks!
Please advise.
Thanks!
#include <signal.h>
void watchdog(int sig)
{
printf("Pet the dog\r\n");
/* reset the timer so we get called again in 5 seconds */
alarm(5);
}
/* start the timer - we want to wake up in 5 seconds */
int main()
{
/* set up our signal handler to catch SIGALRM */
signal(SIGALRM, watchdog);
alarm(5);
while (true)
;
}
Do you have wdt installed?
Code:#include <signal.h> void watchdog(int sig) { printf("Pet the dog\r\n"); /* reset the timer so we get called again in 5 seconds */ alarm(5); } /* start the timer - we want to wake up in 5 seconds */ int main() { /* set up our signal handler to catch SIGALRM */ signal(SIGALRM, watchdog); alarm(5); while (true) ; }