Appendix Awatchdog Timer; A.1 About Watchdog Timer; A.2 Sample Program - AXIOMTEK IPC920 Series User Manual

Industrial computers
Table of Contents

Advertisement

IPC920 Series User's Manual
APPENDIX A
WATCHDOG TIMER

A.1 About Watchdog Timer

Software stability is a major issue in most applications. Some embedded systems are not watched by an
operator for 24 hours. It is usually too late to wait for someone to reboot when computer hangs. The
systems need to be able to reset automatically when things go wrong. The watchdog timer gives us a
solution in this regard.
The watchdog timer is a counter that triggers a system reset when it counts down to zero from a preset
value. The software starts the counter with an initial value and must reset it periodically. If the counter ever
reaches zero which means the software has crashed, the system will reboot.

A.2 Sample Program

#include "stdafx.h"
#include <windows.h>
#include <stdio.h>
#include <tchar.h>
#include <stdlib.h>
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
#pragma comment (lib, "User32.lib" )
#define IDT_TIMER WM_USER + 200
#define _CRT_SECURE_NO_WARNINGS 1
#define setbit(value,x) (value |=(1<<x))
#define clrbit(value,x) (value &=~(1<<x))
HINSTANCE hinstLibDLL = NULL;
LONG WDTDATA = 0;
typedef ULONG(*LPFNDLLGETIOSPACE)(ULONG);
LPFNDLLGETIOSPACE lpFnDll_Get_IO;
typedef void(*LPFNDLLSETIOSPACE)(ULONG, ULONG);
LPFNDLLSETIOSPACE lpFnDll_Set_IO;
int _tmain(int argc, _TCHAR* argv[])
Watchdog Timer
79

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the IPC920 Series and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Ipc920-r-f1Ipc920-r-f1eIpc920-h-f1Ipc920-h-f1e

Table of Contents