English
Language : 

MC9S12KG128_10 Datasheet, PDF (198/606 Pages) Freescale Semiconductor, Inc – HCS12 Microcontrollers
Chapter 5 Clocks and Reset Generator (CRGV4) Block Description
NOTE
The clock quality checker enables the PLL and the voltage regulator
(VREG) anytime a clock check has to be performed. An ongoing clock
quality check could also cause a running PLL (fSCM) and an active VREG
during pseudo-stop mode or wait mode
5.4.5
Computer Operating Properly Watchdog (COP)
OSCCLK
WAIT(COPWAI),
STOP(PSTP,PCE),
COP enable
CR[2:0]
0:0:0
CR[2:0]
0:0:1
÷ 16384
÷4
0:1:0
÷4
0:1:1
÷4
1:0:0
÷4
1:0:1
gating condition
= Clock Gate
÷2
1:1:0
÷2
1:1:1
COP TIMEOUT
Figure 5-21. Clock Chain for COP
The COP (free running watchdog timer) enables the user to check that a program is running and
sequencing properly. The COP is disabled out of reset. When the COP is being used, software is
responsible for keeping the COP from timing out. If the COP times out it is an indication that the software
is no longer being executed in the intended sequence; thus a system reset is initiated (see Section 5.5.2,
“Computer Operating Properly Watchdog (COP) Reset).” The COP runs with a gated OSCCLK (see
Section Figure 5-21., “Clock Chain for COP”). Three control bits in the COPCTL register allow selection
of seven COP time-out periods.
When COP is enabled, the program must write 0x0055 and 0x00AA (in this order) to the ARMCOP
register during the selected time-out period. As soon as this is done, the COP time-out period is restarted.
If the program fails to do this and the COP times out, the part will reset. Also, if any value other than
0x0055 or 0x00AA is written, the part is immediately reset.
Windowed COP operation is enabled by setting WCOP in the COPCTL register. In this mode, writes to
the ARMCOP register to clear the COP timer must occur in the last 25% of the selected time-out period.
A premature write will immediately reset the part.
If PCE bit is set, the COP will continue to run in pseudo-stop mode.
MC9S12KG128 Data Sheet, Rev. 1.16
198
Freescale Semiconductor