72
Agere Systems Inc.
T8302 Internet Protocol Telephone
Advanced RISC Machine (
ARM
)
Data Sheet
July 2001
7 Programmable Timers
(continued)
The following text describes the general usage of the watchdog timer:
I
Set the
count rate register
(see Table 47 on page 74)
to divide the clock input for the watchdog timer. The count
rate is selected by programming the watchdog timer count rate field (
WTR
) with an index of between 0 and 11.
I
Set the watchdog timer to run off of the system clock or the RTC crystal by setting the
WIC
bit in the
timer con-
trol register
(see Table 52 on page 76)
. This must be done before
WTE
is set.
I
Set the watchdog timer
WTI
bit in the
timer control register
to generate an interrupt or a reset when the timer
expires.
I
Set the watchdog timer
WTR
bit in the
timer control register
for the desired reset mode.
I
Enable the timer by setting the
WTE
bit in the
timer control register
.
I
When the timer is enabled, the
WT count register
(see Table 49 on page 75)
begins counting upwards. Writing
0xFADE to the
WT count register
will reset the timer and the count will start counting from 0 again.
I
When the
WT count register
value reaches 0xFFFF, the
timer status register
bit
WTS
(see Table 50 on page
75)
bit will be set.
I
If
WTM
is set to 1 in the
timer interrupt mask register
, the timer IRQ in the
interrupt request status register
(see Table 26 on page 51)
will be asserted (assuming it has been enabled in the
interrupt request enable reg-
ister
(see Table 27 on page 51)
.
I
Write a 1 to the
WTS
bit of the
timer status register
(see Table 50 on page 75)
to clear the watchdog timer inter-
rupt.
The watchdog timer function is illustrated below.
5-8226(F)
Figure 10. Watchdog Timer Block Diagram
Comments
I
The
WT count register
(see Table 49 on page 75)
can be read at any time, but cannot be written after the watch-
dog timer has been enabled.
I
A write access to the
WT count register
(see Table 49 on page 75)
address with a data value 0xFADE causes
the
WT count register
(see Table 49 on page 75)
to be set to the all-zeros value. Writing 0xFADE to the
WT
count register
will also clear the
WT
status bit.
I
If the watchdog timer enable bit
WTE
(see Table 52 on page 76)
is set to 1 and the
WT count register
incre-
ments to the all-ones value, the watchdog timer time-out signal is asserted. The effect of the watchdog time-out
is determined by the value of the watchdog timer interrupt bit
WTI
in the
timer control register
(see Table 52 on
page 76)
. If
WTI
is 1, a watchdog time-out will cause an interrupt. If another time-out occurs before the interrupt
is cleared in the
timer status register
, a watchdog reset will occur. If
WTI
is 0, a time-out will always cause a
watchdog reset.
P
WATCHDOG TIMER COUNT RATE
WATCHDOG TIMER ENABLE
WATCHDOG TIMER TIMEOUT
WT COUNT REGISTER
RESET
VALUE 0XFADE
ALL 1s