beautypg.com

Wd: watchdog timer, Wd user interface – Rainbow Electronics AT75C310 User Manual

Page 117

background image

AT75C310

117

WD: Watchdog Timer

The AT75C310 has an internal watchdog timer which can
be used to prevent system lock-up if the software becomes
trapped in a deadlock. In normal operation, the user
reloads the watchdog at regular intervals before the timer
overflow occurs. If an overflow does occur, the watchdog
timer generates one or a combination of the following sig-
nals depending on the parameters in WD_OMR (Overflow
Mode Register):

If RSTEN is set, an internal reset is generated
(WD_RESET as shown in Figure 28).

If IRQEN is set, a pulse is generated on the signal
WDIRQ which is connected to the Advanced Interrupt
Controller.

If EXTEN is set, a low level is driven on the NWDOVF
signal for a duration of eight ACLK cycles.

The watchdog timer has a 16-bit down counter. Bits 12 to
15 of the value loaded when the watchdog is restarted are
programmable using the HPCV parameter in WD_CMR
(Clock Mode). Four clock sources are available to the
watchdog counter: ACLK/8, ACLK/32, ACLK/128 or
ACLK/1024. The selection is made using the WDCLKS
parameter in WD_CMR. This provides a programmable
time-out period of 1.3 ms to 2.6 seconds with a 24 MHz
system clock.

All write accesses are protected by control access keys to
help prevent corruption of the watchdog should an error
condition occur. To update the contents of the mode and
control registers it is necessary to write the correct bit pat-
tern to the control access key bits at the same time as the
control bits are written (the same write access).

Figure 28. Watchdog Timer Block Diagram

WD User Interface

WD Base Address: 0xFF028000

Offset

Register Description

Register Name

Access

Reset State

0x00

Overflow Mode Register

WD_OMR

Read/write

0

0x04

Clock Mode Register

WD_CMR

Read/write

0

0x08

Control Register

WD_CR

Write-only

0x0C

Status Register

WD_SR

Read-only

0

Advanced

Peripheral

Bus (APB)

WD_RESET

WDIRQ

ACLK/8

ACLK/32

ACLK/128

ACLK/1024

Control Logic

Clock Select

16-Bit

Programmable

Down Counter

CLK_CNT

Clear

Overflow

NWDOVF