Watchdog During Reset; Power-On Reset; Software Reset; Watchdog After Reset - Motorola DragonBall MC9328MX1 Reference Manual

Integrated portable system processor
Table of Contents

Advertisement

Watchdog Timer Module

14.2.2 Watchdog During Reset

14.2.2.1 Power-On Reset

During a power-on reset (POR) all registers are reset to their reset values and the counter is placed in the
idle state until the watchdog is enabled. The Watchdog Status Register (WSTR) contains the source of the
reset event and the interrupt status bit TINT is reset to 0.

14.2.2.2 Software Reset

When software reset occurs, the software reset (SWR) bit in Watchdog Control Register (WCR) is set to 1,
all registers are reset to their reset values and the counter is placed in the idle state until the watchdog is
enabled.

14.3 Watchdog After Reset

After reset, watchdog timer operation can be divided into four states: initial load, countdown, reload, and
time-out. The following sections define each of the watchdog timer states after reset.

14.3.1 Initial Load

The Watchdog Control Register (WCR) bits WT[6:0] must be written to before the watchdog is enabled.
The watchdog is then enabled by setting the one-time writable watchdog enable (WDE) bit in the WCR.
The time-out value is loaded into the counter after the service sequence is written to the Watchdog Service
Register (WSR) or after the watchdog is enabled. The service sequence is described in Section 14.3.3,
"Reload." The counter state machine is shown in Figure 14-2 on page 14-4.

14.3.2 Countdown

The counter is activated after the Watchdog is enabled and begins to count down from its initial
programmed value. If any system errors have occurred which prevents the software from servicing the
Watchdog Service Register (WSR), the timer will time-out when the counter reaches zero. If the WSR is
serviced prior to the counter reaching zero, the watchdog reloads its counter to the time-out value indicated
by bits WT[6:0] of the WCR and re-start the countdown. A reset will reset the counter and place it in the
idle state at any time during the countdown. The counter state machine is shown in Figure 14-2 on
page 14-4.

14.3.3 Reload

The recommended service sequence is to write a $5555 followed by a $AAAA to the WSR. To reload the
counter, the writes must take place within the time-out value indicated by bits WT[6:0] of the WCR. Any
number of instructions can be executed between the two writes. This service sequence is also used to
activate the counter during the initial load. See Section 14.3.1, "Initial Load."
If the WSR is not loaded with a $5555 prior to a write of $AAAA to the WSR, the counter will not be
reloaded. If any value other than $AAAA is written to the WSR after $5555, the counter will not be
reloaded.
14-2
MC9328MX1 Reference Manual
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents