E m b e d d e d B o x P C
B O X E R - 6 4 0 4
A.2 WatchDog Sample Program
******************************************************************************
// WDT I/O operation relative definition (Please reference to Table 1)
#define
WDTAddr 0xA00 // WDT I/O base address
Void
WDTWriteByte(
byte
Register,
byte
Value);
byte
WDTReadByte(
byte
Register);
Void
WDTSetReg(
byte
Register,
byte
Bit,
byte
Val);
// Watch Dog relative definition (Please reference to Table 2)
#define
DevReg 0x00 // Device configuration register
#define
WDTRstBit 0x80 // Watchdog WDTRST# (Bit7)
#define
WDTRstVal 0x80 // Enabled WDTRST#
#define
TimerReg 0x05 // Timer register
#define
PSWidthBit 0x00 // WDTRST# Pulse width (Bit0:1)
#define
PSWidthVal 0x01 // 25ms for WDTRST# pulse
#define
PolarityBit 0x02 // WDTRST# Signal polarity (Bit2)
#define
PolarityVal 0x00 // Low active for WDTRST#
#define
UnitBit 0x03 // Unit for timer (Bit3)
#define
ModeBit 0x04 // WDTRST# mode (Bit4)
#define
ModeVal 0x01 // 0:level 1: pulse
#define
EnableBit 0x05 // WDT timer enable (Bit5)
#define
EnableVal 0x01 // 1: enable
#define
StatusBit 0x06 // WDT timer status (Bit6)
#define
CounterReg 0x06 // Timer counter register
*******************************************************************************
*******************************************************************************
VOID
Main
(){
// Procedure : AaeonWDTConfig
// (byte)Timer : Counter of WDT timer.(0x00~0xFF)
// (boolean)Unit : Select time unit(0: second, 1: minute).
AaeonWDTConfig(Counter, Unit);
// Procedure : AaeonWDTEnable
// This procudure will enable the WDT counting.
AaeonWDTEnable();
Appendix A Programming the Watchdog Timer
A-3
DISTRIBUTED BY TEXIM EUROPE
Summary of Contents for BOXER-6404
Page 75: ...Embedded Box PC B O X E R 6 4 0 4 Appendix B I O Information B 3 DISTRIBUTED BY TEXIM EUROPE ...
Page 78: ...Embedded Box PC B O X E R 6 4 0 4 Appendix B I O Information B 6 DISTRIBUTED BY TEXIM EUROPE ...
Page 79: ...Embedded Box PC B O X E R 6 4 0 4 Appendix B I O Information B 7 DISTRIBUTED BY TEXIM EUROPE ...
Page 80: ...Embedded Box PC B O X E R 6 4 0 4 Appendix B I O Information B 8 DISTRIBUTED BY TEXIM EUROPE ...
Page 81: ...Embedded Box PC B O X E R 6 4 0 4 Appendix B I O Information B 9 DISTRIBUTED BY TEXIM EUROPE ...
Page 82: ...Embedded Box PC B O X E R 6 4 0 4 Appendix B I O Information B 10 DISTRIBUTED BY TEXIM EUROPE ...
Page 83: ...Embedded Box PC B O X E R 6 4 0 4 Appendix B I O Information B 11 DISTRIBUTED BY TEXIM EUROPE ...
Page 84: ...Embedded Box PC B O X E R 6 4 0 4 Appendix B I O Information B 12 DISTRIBUTED BY TEXIM EUROPE ...
Page 85: ...Embedded Box PC B O X E R 6 4 0 4 Appendix B I O Information B 13 DISTRIBUTED BY TEXIM EUROPE ...
Page 86: ...Embedded Box PC B O X E R 6 4 0 4 Appendix B I O Information B 14 DISTRIBUTED BY TEXIM EUROPE ...
Page 87: ...Embedded Box PC B O X E R 6 4 0 4 Appendix B I O Information B 15 DISTRIBUTED BY TEXIM EUROPE ...