Miscellaneous Control Module (MCM)
MPC5510 Microcontroller Family Reference Manual, Rev. 1
16-6
Freescale Semiconductor
Preliminary
16.2.2.2
Software Watchdog Timer Service Register (SWTSR)
•
The SWTCR[SWRI] can specify a sequence of responses. Upon the first time-out, the watchdog
timer interrupt is asserted. If the watchdog timer interrupt flag is not cleared before a second
time-out occurs
,
the watchdog timer asserts the system reset signal in response to the second
time-out. This configuration supports a more graceful response to watchdog time-outs: first
attempting an interrupt to notify the system, if that fails, generating a system reset.
The software service sequence must be performed using the SWTSR as a data register to prevent a SWT
time-out. The service sequence requires two writes to this data register: first a write of 0x55 followed by
a write of 0xAA. Both writes must be performed in this order prior to the SWT time-out, but any number
of instructions or accesses to the SWSR may occur between the two writes. If the SWT has already timed
out, writing to this register has no effect in negating the SWT interrupt or reset.
illustrates the
SWTSR.
SWE
Software Watchdog Enable.
0 SWT is disabled.
1 SWT is enabled.
SWRI
Software Watchdog Reset/Interrupt.
00 If a time-out occurs, the SWTIC interrupt flag is set and the SWT generates an interrupt request to the system.
The programming of the interrupt level for the SWT is system-specific. Typically, the highest priority interrupt
level is used to signal the SWT.
01 The first time-out sets the SWTIC watchdog interrupt flag and the SWT generates an interrupt request to the
system. If the SWTIC watchdog timer interrupt flag is not cleared before a second time-out occurs, the
watchdog timer asserts the system reset signal in response to the second time-out.
10 If a time-out occurs, the SWT generates a system reset.
11 The SWT functions in a window mode of operation. For this mode, the servicing of the MSWSR must occur
during the last 25% of the time-out period. Any writes to the MSWSR during the first 75% of the time-out
period generate an immediate system reset. Likewise, if the MSWSR is not serviced during the last 25% of
the time-out period, then a system reset is generated.
SWT
Software Watchdog Time-Out Period. Selects the time-out period for the SWT. At reset, this field is 0b10001 (2
17
clocks).
In general, the value in this field defines the bit position within the 32-bit counter that specifies the time-out period.
Thus, if SWT = n, then the time-out period is 2
n
system clock cycles. Since it is not practical to operate the
software watchdog timer with very short time-out periods, data values of [0–7] are forced to a value of 8, defining
a minimum time-out period of 256 system clock cycles. The logic which forces the minimum value to 8 does not
affect the contents of this field in the register.
For SWT = n, then time-out period = 2
n
system clock cycles, n = 8 9,..., 31.
Offset: MCM_BAS 0x001B
Access: User read/write
0
1
2
3
4
5
6
7
R
SWSR
W
Reset
–
–
–
–
–
–
–
–
Figure 16-2. Software Watchdog Timer Service Register (SWTSR)
Table 16-3. SWTCR Field Descriptions (continued)
Field
Description