03.01.2015 Views

80C186EC/80C188EC Microprocessor User's Manual

80C186EC/80C188EC Microprocessor User's Manual

80C186EC/80C188EC Microprocessor User's Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 12<br />

WATCHDOG TIMER UNIT<br />

System upsets can come from a variety of sources. Errant software can work its way into an endless<br />

loop, waiting for an event that never occurs. An unanticipated radiation source can couple<br />

into improperly shielded circuitry. Not all sources of system upsets can be anticipated and guarded<br />

against. The Watchdog Timer Unit provides a graceful method for recovery from unexpected<br />

hardware and software upsets.<br />

Watchdog timers are designed to reset the system unless the timer is periodically reloaded with a<br />

new value (this is also known as “kicking the watchdog”). The system software is responsible for<br />

reloading the watchdog timer. It is assumed that errant code or a system lockup will prevent the<br />

watchdog timer from being reloaded, resulting in a system reset. A special instruction sequence,<br />

a sequence that errant code would be very unlikely to produce, is typically used to reload the timer.<br />

The Watchdog Timer Unit (WDT) can function either as a system watchdog or as a general-purpose<br />

timer, or it can be disabled for systems that do not wish to use it.<br />

12.1 FUNCTIONAL OVERVIEW<br />

A block diagram of the Watchdog Timer Unit is shown in Figure 12-1. The 32-bit down counter<br />

decrements every CLKOUT cycle. The WDTOUT pin is driven low for four CLKOUT cycles<br />

when the down counter reaches zero (a WDT timeout). The WDTOUT signal may be used to reset<br />

the device or as an interrupt request.<br />

The down counter is reloaded with the 32-bit reload value under two conditions:<br />

• when a special LOCKed instruction sequence is issued to the Protection and Control<br />

Circuitry<br />

• when the down counter reaches zero<br />

The Protection and Control Circuitry is responsible for enabling and disabling the Watchdog<br />

Timer as well as preventing unauthorized modification of count values.<br />

12.2 USING THE WATCHDOG TIMER AS A SYSTEM WATCHDOG<br />

There are two methods for recovery following a software upset: a full system reset or an interrupt<br />

request. Both methods can be implemented with the Watchdog Timer Unit.<br />

12-1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!