SBC82810 Pentium
®
M All-in-One Half-Size Board User’s Manual
Watchdog Timer
66
Watchdog Control Sample
Using the Watchdog Function
Function Reg.
Assembler
Setting Base
Time
PCI Reg. 60h , bit 2
Bit2=0
Î
1ms (default)
Bit2=1
Î
1 us
Max. TimeVaule =
0FFFFFh * 1 ms
mov ebx,TimeValue
Read WDT
BaseAdress
PCI Reg. 10h ~ 13h
mov eax,8000EC10h
mov dx,0cf8h
out dx,eax
mov dx,0cfch
in eax,dx
mov edi,eax ;; store
BaseAddress to edi
WDT unlock BaseA 0Ch
Î
80h
BaseA 0Ch
Î
86h
push es ; backup es
Reg.
xor ax,ax
mov es,ax
mov ax,8680h
mov es:[edi+0ch],al
mov es:[edi+0ch],ah
Set Timer
Value
BaseA 04h ~
07h
mov es:[edi+04h],ebx
pop es ; restore es
Reg.
Set Free
Running
mode
PCI Reg.68h, bit 3,2
Bit2=1, Free Running
mode
mov eax,8000EC68h
mov dx,0cf8h
out dx,eax
mov dl,0fch
mov al,04h ;; Free
Running mode
out dx,al
Reload Timer
Function Reg.
Assembler