eBOX671A Series u
ser’s Manual
Watchdog Timer
63
APPENDIX A
WATCHDOG TIMER
A.1 About Watchdog Timer
Software stability is major issue in most application. Some embedded systems are not watched
by human for 24 hours. It is usually too slow 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 solution.
The watchdog timer is a counter that triggers a system reset when it counts down to zero from
a preset value. The software starts 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 W 200
#define _CRT_SECURE_NO_WARNINGS 1
#define setbit(value,x) (value |=(1<<x))
#define clrbit(value,x) (value &=~(1<<x))
HINSTANCE hinstLibDLL = NULL;
Содержание eBOX671A Series
Страница 1: ...eBOX671A Series Embedded System User s Manual ...
Страница 49: ...eBOX671A Series user s Manual BIOS Setup Utility 41 Serial Port 1 Serial Port 2 ...
Страница 50: ...eBOX671A Series user s Manual 42 BIOS Setup Utility Serial Port 3 Serial Port 4 ...
Страница 56: ...eBOX671A Series user s Manual 48 BIOS Setup Utility ...
Страница 57: ...eBOX671A Series user s Manual BIOS Setup Utility 49 ...
Страница 70: ...eBOX671A Series user s Manual 62 BIOS Setup Utility This page is intentionally left blank ...
Страница 74: ...eBOX671A Series user s Manual 66 Programmable LED This page is intentionally left blank ...