beautypg.com

Watchdog timer – Acrosser AR-B1661 User Manual

Page 22

background image

AR-B1661 Manual

20

3. WATCHDOG TIMER

This section describes the use of Watchdog Timer, including disable, enable, and trigger. AR-B1661is
equipped with a programmable time-out period watchdog timer that occupies I/O port 443H. Users can
use simple program to enable the watchdog timer. Once you enable the watchdog timer, the program
should trigger it every time before it times out. Watchdog Timer will generate a response (system or
IRQ9) due to system fails to trigger or disable watchdog timer before preset timer, times out.

Watchdog

Register

Time Base

Counter and

Compartor

RESET

Enable(D7)

Time Factor

(D0-D5)

Write and

Trigger

Watchdog Block Diagram

3.1 WATCHDOG TIMER SETTING

The watchdog timer is a circuit that maybe be used from your program software to detect crash or hang
up.

The Watchdog timer is automatically disabled after reset. Once you enabled the watchdog timer, your
program should trigger the watchdog timer every time before it times out. After you trigger the
watchdog timer, the timer will be set to zero and start to count again. If your program fails to trigger the
watchdog timer before times out, it will generate a reset pulse to reset the system or trigger the IRQ 9
signal in order to tell your system that the watchdog time is out.


Please refer to the following table in order to properly program Watchdog function

D7

D6

D5 D4 D3 D2 D1 D0

1

Enable

Reset

0

Disable

IRQ 9

Time period


Users could test watchdog function under ‘Debug’ program as follows:

C:>debug
l O 443 C8H

Generally, watchdog function would reset system after 8 seconds

l O 443 0

Disable watchdog function

C:>debug
l O 443 88H

Generally, watchdog function would generate IRQ 9 after 8 seconds

l O 443 0H
Disable watchdog function

3.2 WATCHDOG TIMER TRIGGER

After you enable the watchdog timer, your program must write the same factor as triggering to the

watchdog timer at least once during every time-out period. You can change the time-out period by
writing another timer factor to the watchdog register at any time, and you must trigger the watchdog
during every new time-out period in next trigger.