beautypg.com

ADLINK M-342 User Manual

Page 90

background image

76

Watchdog Timer

IoWrite8 (NCT6776F_CONFIG_INDEX , 0xEA);

// selection GP34 to WDTO

IoWrite8 (NCT6776F_CONFIG_DATA , 0x10);

IoWrite8 (NCT6776F_CONFIG_INDEX , 0x2B);

// Pin80 function selection to GP34

Data8 = IoRead8(NCT6776F_CONFIG_DATA) | 0x10;

IoWrite8 (NCT6776F_CONFIG_DATA , Data8);

IoWrite8 (NCT6776F_CONFIG_INDEX , 0x07);

IoWrite8 (NCT6776F_CONFIG_DATA , 0x08);

IoWrite8 (NCT6776F_CONFIG_INDEX , 0x30);

Data8 = IoRead8(NCT6776F_CONFIG_DATA) | SetupData-

>WDT_Control ; //Enable(1) / Disable(0) WDT

function.

IoWrite8 (NCT6776F_CONFIG_DATA , Data8);

IoWrite8(NCT6776F_CONFIG_INDEX, 0xF5);

Data8 = IoRead8(NCT6776F_CONFIG_DATA) | SetupData-

>WDT_CountMode; //WDT_CountMode: 0x00 is Second

mode, 0x08 is minute mode

IoWrite8 (NCT6776F_CONFIG_DATA , Data8);

IoWrite8(NCT6776F_CONFIG_INDEX, 0xF6);

IoWrite8(NCT6776F_CONFIG_DATA, SetupData-

>WDT_TimeOut); //WDT_TimeOut means the timeout

value

SIOConfigExit();

}