34.1 Architectural Overview

The primary function of the Deadman Timer (DMT) is to interrupt the processor in the event of a software malfunction. The DMT, which works on the system clock, is a free-running instruction fetch timer, which is clocked whenever an instruction fetch occurs, until a count match occurs. Instructions are not fetched when the processor is in Sleep mode.

DMT can be enabled in the Configuration fuse or by software in the DMTCON register by setting the ON bit.

The DMT module consists of a 32-bit counter, the read-only DMTCNT register, and a time-out count match value as specified by the PSCNT register. Whenever the count match occurs, a DMT event will occur, which is a soft trap. A DMT is typically used in mission-critical and safety-critical applications where any single failure of the software functionality and sequencing must be detected. Figure 34-1 shows a block diagram of the Deadman Timer module.

Figure 34-1. Deadman Timer Block Diagram
Note:
  1. The DMT can be enabled via Special Function Register (SFR), DMTCON.
  2. The DMT is clocked whenever the instructions are fetched by the processor using a system clock. For example, after executing a GOTO instruction (which uses four instruction cycles), the DMT counter will be incremented only once.
  3. BAD1 and BAD2 are the improper sequence flags.
  4. A DMT event is a non-maskable soft trap.