Appendix Awatchdog Timer; About Watchdog Timer; Sample Program - AXIOMTEK eBOX671A Series User Manual

Embedded system
Table of Contents

Advertisement

eBOX671A Series user's Manual
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 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;
Watchdog Timer
63

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

This manual is also suitable for:

Ebox671a-cml-gbe

Table of Contents