Wdt Sample Code - C&T Solution BCO-2000 Series User Manual

Compact fanless embedded system
Table of Contents

Advertisement

Appendix – WDT & GPIO

WDT Sample Code:

#define AddrPort
0x2e
#define DataPort
0x2f
#define SIO_UnLock_Value
#define SIO_Lock_Value
#define WATCHDOG_LDN
#define GPIO_Port
//Enter_Config
WriteByte (AddrPort, SIO_UnLock_Value);
WriteByte (AddrPort, SIO_UnLock_Value);
//Enter WATCHDOG LDN
WriteByte (AddrPort, 0x07);
WriteByte (DataPort, WATCHDOG_LDN);
//Set count mode
WriteByte (AddrPort, 0xf0);
buf2 = ReadByte (DataPort) & 0xf4; //clear "Select Watchdog Timer I count mode
buf2 |= 0x02;
// buf2 |= 0x08;
WriteByte (DataPort, buf2);
//Set watch dog time value
WriteByte (AddrPort, 0xf1)
WriteByte (DataPort, Time)
// close config mode
WriteByte (AddrPort, 0xaa);
0x87
0xaa
0x08
0xF1
//Enable the Watchdog Timer I output low pulse to the KBRST# pin
//Bit3 = (1:Minute Mode/0:Second Mode)
//Write back
//Set watch dog time value
BCO-2000 l User's Manual
91

Advertisement

Table of Contents
loading

This manual is also suitable for:

Bco-2000-8365ueBco-2000-4305ue

Table of Contents