- 70 -
Appendix
Appendix B. Watchdog Timer (WDT) Setting
WDT is widely used for industrial application to monitor CPU activities. The application
software depends on its requirement to trigger WDT with adequate timer setting. Before
WDT timeout, the functional normal system will reload the WDT. The WDT never time-out
for a normal system. The WDT will not be reloaded by an abnormal system, then WDT will
time-out and auto-reset the system to avoid abnormal operation.
This computer supports 255 levels watchdog timer by software programming I/O ports.
Below is an program example to disable and load WDT.
Sample Codes:
/*----- Include Header Area -----*/
#include “math.h”
#include “stdio.h”
#include “dos.h”
unsigned char sioIndex = 0x2E;
/* or index = 0x4E */
unsigned char sioData = 0x2F;
/* or data = 0x4F */
/*----- routing, sub-routing -----*/
void main()
{
outportb(sioIndex, 0x87);
/* Enable Super I/O */
outportb(sioIndex, 0x87);
outportb(sioIndex, 0x07);
/* Select logic device –
WDT */
outportb(sioData, 0x07);
outportb(sioIndex, 0x30);
/* Enable WDT */
outportb(sioData, 0x01);
outportb(sioIndex, 0xF0);
/* Enable WDTRST# Output
*/
outportb(sioData, 0x80);
outportb(sioIndex, 0xF6);
/* Set WDT Timeout value
*/
outportb(sioData, 0x05);
outportb(sioIndex, 0xF5);
/* Set Configure and En
-
able WDT timer, Start countdown */
outportb(sioData, 0x32);
outportb(sioIndex, 0xAA);
/* SIO - Disable */
}
Содержание HiCORE-i89Q1
Страница 1: ...1 HiCORE i89Q1 HiCORE i89Q2 PICMG 1 0 Full size SBC User s Manual Version 1 2 2018 01 ...
Страница 9: ...1 Chapter 1 Introduction Chapter 1 Introduction ...
Страница 17: ...2 Chapter 2 Installation Chapter 2 Installation ...
Страница 44: ... 36 This page is intentionally left blank ...
Страница 45: ...3 Chapter 3 BIOS Chapter 3 BIOS ...
Страница 73: ... 65 Appendix Appendix ...