C8051F120/1/2/3/4/5/6/7
Rev. 1.2
169
14.4. Missing Clock Detector Reset
The Missing Clock Detector is essentially a one-shot circuit that is triggered by the MCU system clock. If the system
clock goes away for more than 100 µs, the one-shot will time out and generate a reset. After a Missing Clock Detector
reset, the MCDRSF flag (RSTSRC.2) will be set, signifying the MSD as the reset source; otherwise, this bit reads ‘0’.
The state of the /RST pin is unaffected by this reset. Setting the MCDRSF bit, RSTSRC.2 (see Section
“
15. OSCILLATORS
” on page
173
) enables the Missing Clock Detector.
14.5. Comparator0 Reset
Comparator0 can be configured as a reset input by writing a ‘1’ to the C0RSEF flag (RSTSRC.5). Comparator0
should be enabled using CPT0CN.7 (see Section “
11. COMPARATORS
” on page
111
) prior to writing to C0RSEF
to prevent any turn-on chatter on the output from generating an unwanted reset. The Comparator0 reset is active-low:
if the non-inverting input voltage (CP0+ pin) is less than the inverting input voltage (CP0- pin), the MCU is put into
the reset state. After a Comparator0 Reset, the C0RSEF flag (RSTSRC.5) will read ‘1’ signifying Comparator0 as the
reset source; otherwise, this bit reads ‘0’. The state of the /RST pin is unaffected by this reset.
14.6. External CNVSTR0 Pin Reset
The external CNVSTR0 signal can be configured as a reset input by writing a ‘1’ to the CNVRSEF flag (RSTSRC.6).
The CNVSTR0 signal can appear on any of the P0, P1, P2 or P3 I/O pins as described in Section “
19.1. Ports 0
through 3 and the Priority Crossbar Decoder
” on page
217
. Note that the Crossbar must be configured for the
CNVSTR0 signal to be routed to the appropriate Port I/O. The Crossbar should be configured and enabled before the
CNVRSEF is set. When configured as a reset, CNVSTR0 is active-low and level sensitive. CNVSTR0 cannot be
used to start ADC0 conversions when it is configured as a reset source. After a CNVSTR0 reset, the CNVRSEF flag
(RSTSRC.6) will read ‘1’ signifying CNVSTR0 as the reset source; otherwise, this bit reads ‘0’. The state of the
⁄
RST
pin is unaffected by this reset.
14.7. Watchdog Timer Reset
The MCU includes a programmable Watchdog Timer (WDT) running off the system clock. A WDT overflow will
force the MCU into the reset state. To prevent the reset, the WDT must be restarted by application software before
overflow. If the system experiences a software or hardware malfunction preventing the software from restarting the
WDT, the WDT will overflow and cause a reset. This should prevent the system from running out of control.
Following a reset the WDT is automatically enabled and running with the default maximum time interval. If desired
the WDT can be disabled by system software or locked on to prevent accidental disabling. Once locked, the WDT
cannot be disabled until the next system reset. The state of the /RST pin is unaffected by this reset.
The WDT consists of a 21-bit timer running from the programmed system clock. The timer measures the period
between specific writes to its control register. If this period exceeds the programmed limit, a WDT reset is generated.
The WDT can be enabled and disabled as needed in software, or can be permanently enabled if desired. Watchdog
features are controlled via the Watchdog Timer Control Register (WDTCN) shown in Figure 14.3.
14.7.1. Enable/Reset WDT
The watchdog timer is both enabled and reset by writing 0xA5 to the WDTCN register. The user's application soft-
ware should include periodic writes of 0xA5 to WDTCN as needed to prevent a watchdog timer overflow. The WDT
is enabled and reset as a result of any system reset.
Summary of Contents for C8051F120
Page 2: ...C8051F120 1 2 3 4 5 6 7 2 Rev 1 2 Notes ...
Page 8: ...C8051F120 1 2 3 4 5 6 7 8 Rev 1 2 26 2 Flash Programming Commands 318 26 3 Debug Support 321 ...
Page 16: ...C8051F120 1 2 3 4 5 6 7 16 Rev 1 2 Notes ...
Page 48: ...C8051F120 1 2 3 4 5 6 7 48 Rev 1 2 ...
Page 98: ...C8051F120 1 2 3 4 5 6 7 98 Rev 1 2 ...
Page 106: ...C8051F120 1 2 3 4 5 6 7 106 Rev 1 2 Notes ...
Page 183: ...C8051F120 1 2 3 4 5 6 7 Rev 1 2 183 Notes ...
Page 184: ...C8051F120 1 2 3 4 5 6 7 184 Rev 1 2 ...
Page 214: ...C8051F120 1 2 3 4 5 6 7 214 Rev 1 2 Notes ...