ADLINK NuPRO-E320 User Manual

Page 87

Advertising
background image

Watchdog Timer

73

NuPRO-E320

break;

case 0x4E:

//Address port = 0x4E, enter keys = 0x87,

0x01, 0x55, 0xAA

outportb(0x2E, 0x87);

outportb(0x2E, 0x01);

outportb(0x2E, 0x55);

outportb(0x2E, 0xAA);

break;

default:

break;

}

}

void Exit_IT8718_Config(int config_port)

{

outportb(config_port, 0x02);

outportb(config_port+1, 0x02);

}

void WDTRUN(int config_port,int count_value)

{

int temp;

int counter;

//Select WDT device

outportb(config_port, 0x07);

outportb(config_port+1, 0x07);//device 7

//Set second/minute mode

outportb(config_port, 0x72);

temp = inportb(config_port+1);

if(count_value == 0)

{

counter = count_value;

printf("WDT is Disabled.");

outportb(config_port+1, temp);//WDT output

through PWROK2 default is Disabled.

}// end of (count_value == 0)

else if(count_value <= 60){

temp = temp | 0x80;//chip's default is minute.

counter = count_value;

printf("WDT timeout in %d seconds.",counter);

Advertising