Aaeon AEC-6402 Manual page 82

Embedded controller
Table of Contents

Advertisement

E m b e d d e d C o n t r o l l e r
// WDT output mode set to pulse
WDTSetBit(
// WDT output mode set to active low
WDTSetBit(
// WDT output pulse width is 25ms
WDTSetBit(
// Watchdog WDTRST# Enable
WDTSetBit(
}
WDTClearTimeoutStatus()
VOID
WDTSetBit(
}
**************************************************************************
*****
**************************************************************************
*****
WDTWriteByte(byte Register, byte Value)
VOID
IOWriteByte(WDTAddr+Register, Value);
}
WDTReadByte(byte Register)
byte
return IOReadByte(WDTAddr+Register);
}
WDTSetBit(byte Register, byte Bit, byte Val)
VOID
byte TmpValue;
TmpValue = WDTReadByte(Register);
TmpValue &= ~(1 << Bit);
TmpValue |= Val << Bit;
WDTWriteByte(Register, TmpValue);
}
**************************************************************************
*****
TimerReg, ModeBit, ModeVal
TimerReg, PolarityBit, PolarityVal
TimerReg, PSWidthBit, PSWidthVal
DevReg, WDTRstBit, WDTRstVal
{
TimerReg, StatusBit, 1
Appendix A Programming the Watchdog Timer A-5
A E C - 6 4 0 2
);
);
);
);
);
{
{
{

Advertisement

Table of Contents
loading

Table of Contents