CT-MCL01 l User’s Manual
71
Watchdog Timer
Board Design
The Watchdog Timer (WDT) is implemented by Nuvoton NCT6106D.
Psuedo Code
#include<dos.h>
#include<stdio.h>
void main(void){
// for 2E
int x,pre_rd,rd,status;
clrscr();
outportb(0x2E,0x87);
outportb(0x2E,0x87);
outportb(0x2E,0x30); //CR30 bit1=1 pin77 select WDTO#
outportb(0x2F,0x01);
outportb(0x2E,0x07);
outportb(0x2F,0x08); //Logic Device8 (LD8)
outportb(0x2E,0x30);
outportb(0x2F,0x01); //Enable WDTO#
// Reset WDTO# and clear WDTO# timeout event
outportb(0x2E,0xF6);
outportb(0x2F,0x00); //Reset WDTO# Timer
outportb(0x2E,0xF7); //Logic Device 8, CRF7
outportb(0x2F,0x00); //Write Bit4=0 to clear WDTO# event!
// Input Timer value
printf("Enter WDTO# Timer(second):");
scanf("%d",&x);
pre_rd = x + 1;
// Set Timer and Start count
outportb(0x2E,0xF6); //LD8,CRF6h Set WDTO# Timer
outportb(0x2F,x);
// Check the timeout event
// LDN8 CRF7[4] = 1 (Timeout occur)
do{
// Read Count
outportb(0x2E,0xF6); //LD8,CRF6h Set WDTO# Timer
rd = inportb(0x2F);
// Read Timeout event
outportb(0x2E,0xF7); //Logic Device 8, CRF7
status = inportb(0x2F);
// check pre-status
if (rd < pre_rd){
printf("Timer = %d\n",rd);
pre_rd = rd;
}
}while(status != 0x10);
printf("Timer Timeout.\n");
printf("Input any key to reset timeout event\n");
getch();
// Reset WDTO# and clear WDTO# timeout event
outportb(0x2E,0xF6);
outportb(0x2F,0x00); //Reset WDTO# Timer
outportb(0x2E,0xF7); //Logic Device 8, CRF7
outportb(0x2F,0x00); //Write Bit4=0 to clear WDTO# event!
Appendix – WDT & GPIO
Summary of Contents for CT-MCL01 Series
Page 1: ...CT MCL01 Series Micro ATX Industrial Motherboard...
Page 8: ...CT MCL01 l User s Manual 8 Block Diagram...
Page 9: ...Chapter 1 Product Introductions...
Page 12: ...CT MCL01 l User s Manual 12 1 2 3 Motherboards Layout Chapter 1 Product Introductions...
Page 45: ...CT MCL01 l User s Manual 45 Chapter 2 BIOS Setup...
Page 47: ...CT MCL01 l User s Manual 47 2 11 5 NCT6106D Super IO Configuration Chapter 2 BIOS Setup...
Page 48: ...CT MCL01 l User s Manual 48 Chapter 2 BIOS Setup...
Page 49: ...CT MCL01 l User s Manual 49 Chapter 2 BIOS Setup...
Page 50: ...CT MCL01 l User s Manual 50 Chapter 2 BIOS Setup...
Page 51: ...CT MCL01 l User s Manual 51 2 11 6 NCT6106D HW Monitor Chapter 2 BIOS Setup...
Page 52: ...CT MCL01 l User s Manual 52 Chapter 2 BIOS Setup 2 11 7 Trusted Computing...
Page 56: ...CT MCL01 l User s Manual 56 2 11 14 Network Stack Configuration Chapter 2 BIOS Setup...
Page 58: ...CT MCL01 l User s Manual 58 Chapter 2 BIOS Setup...
Page 59: ...CT MCL01 l User s Manual 59 Chapter 2 BIOS Setup 2 12 2 PCH IO Configuration...
Page 60: ...CT MCL01 l User s Manual 60 Chapter 2 BIOS Setup...
Page 61: ...CT MCL01 l User s Manual 61 Chapter 2 BIOS Setup...
Page 62: ...CT MCL01 l User s Manual 62 Chapter 2 BIOS Setup...
Page 63: ...CT MCL01 l User s Manual 63 Chapter 2 BIOS Setup...
Page 64: ...CT MCL01 l User s Manual 64 Chapter 2 BIOS Setup...
Page 65: ...CT MCL01 l User s Manual 65 2 13 Security 2 13 1 Secure Boot Chapter 2 BIOS Setup...
Page 66: ...CT MCL01 l User s Manual 66 Chapter 2 BIOS Setup 2 14 Boot...
Page 67: ...CT MCL01 l User s Manual 67 2 15 Save Exit Chapter 2 BIOS Setup...
Page 72: ...Copyright 2016 C T Solution Inc All Rights Reserved www candtsolution com...