12.4.1 COP watchdog operation
The COP watchdog is intended to force a system reset when the application software fails
to execute as expected. To prevent a system reset from the COP timer (when it is
enabled), the application software must reset the COP counter periodically. If the
application program gets lost and fails to reset the COP counter before it times out, a
system reset is generated to force the system back to a known starting point.
After any reset, the COP watchdog is enabled. If the COP watchdog is not used in an
application, it can be disabled by clearing SIM_COPC[COPT].
The COP counter is reset by writing 0x55 and 0xAA (in that order) to the address of the
SIM's Service COP (SRVCOP) register during the selected timeout period. Writes do not
affect the data in the SRVCOP register. As soon as the write sequence is complete, the
COP timeout period is restarted. If the program fails to perform this restart during the
timeout period, the microcontroller resets. Also, if any value other than 0x55 or 0xAA is
written to the SRVCOP register, the microcontroller immediately resets.
SIM_COPC[COPCLKS] and SIM_COPCTRL[COPCLKSEL] select the timeout
duration and clock source used for the COP timer. The clock source options are either the
bus clock, 8 MHz/2 MHz IRC, external crystal or an internal 1 kHz clock source. With
each clock source, the associated timeouts are controlled by SIM_COPC[COPT] and
SIM_COPC[COPCLKS]. The following table summarizes the control functions of
SIM_COPCTRL[COPCLKS] and SIM_COPC[COPCLKSEL] and SIM_COPC[COPT]
fields. The COP watchdog defaults to operation from the 1 kHz clock source and the
longest timeout is 2
10
cycles.
Table 12-1. COP configuration options
Control bits
Clock
source
COP window opens
(SIM_COPC[COPW]=1)
COP overflow
count
SIM_COPC[COPCLK
SEL]
SIM_COPC[COPCLK
S]
SIM_COPC[COP
T]
N/A
N/A
00
N/A
N/A
COP is disabled.
00
0
01
1 kHz
N/A
2
5
cycles (32ms)
1
6,144 cycles
2
13
cycles
(8192ms)
00
0
10
1 kHz
N/A
2
8
cycles
(256ms)
1
49,152 cycles
2
16
cycles
(65536ms)
00
0
11
1 kHz
N/A
2
10
cycles (1024
ms)
1
196,608 cycles
2
18
cycles
(262144ms)
Table continues on the next page...
Functional description
KL27 Sub-Family Reference Manual , Rev. 5, 01/2016
170
Freescale Semiconductor, Inc.
Содержание MKL27Z128VFM4
Страница 2: ...KL27 Sub Family Reference Manual Rev 5 01 2016 2 Freescale Semiconductor Inc...
Страница 54: ...AWIC introduction KL27 Sub Family Reference Manual Rev 5 01 2016 54 Freescale Semiconductor Inc...
Страница 100: ...Module operation in low power modes KL27 Sub Family Reference Manual Rev 5 01 2016 100 Freescale Semiconductor Inc...
Страница 142: ...Functional description KL27 Sub Family Reference Manual Rev 5 01 2016 142 Freescale Semiconductor Inc...
Страница 248: ...Memory map and register descriptions KL27 Sub Family Reference Manual Rev 5 01 2016 248 Freescale Semiconductor Inc...
Страница 256: ...Memory map register descriptions KL27 Sub Family Reference Manual Rev 5 01 2016 256 Freescale Semiconductor Inc...
Страница 262: ...Initialization application information KL27 Sub Family Reference Manual Rev 5 01 2016 262 Freescale Semiconductor Inc...
Страница 292: ...Functional description KL27 Sub Family Reference Manual Rev 5 01 2016 292 Freescale Semiconductor Inc...
Страница 324: ...Functional Description KL27 Sub Family Reference Manual Rev 5 01 2016 324 Freescale Semiconductor Inc...
Страница 390: ...Application information KL27 Sub Family Reference Manual Rev 5 01 2016 390 Freescale Semiconductor Inc...
Страница 422: ...Functional description KL27 Sub Family Reference Manual Rev 5 01 2016 422 Freescale Semiconductor Inc...
Страница 432: ...Initialization Application Information KL27 Sub Family Reference Manual Rev 5 01 2016 432 Freescale Semiconductor Inc...
Страница 442: ...Functional description KL27 Sub Family Reference Manual Rev 5 01 2016 442 Freescale Semiconductor Inc...
Страница 512: ...Functional description KL27 Sub Family Reference Manual Rev 5 01 2016 512 Freescale Semiconductor Inc...
Страница 610: ...Initialization application information KL27 Sub Family Reference Manual Rev 5 01 2016 610 Freescale Semiconductor Inc...
Страница 646: ...Initialization application information KL27 Sub Family Reference Manual Rev 5 01 2016 646 Freescale Semiconductor Inc...
Страница 744: ...Application information KL27 Sub Family Reference Manual Rev 5 01 2016 744 Freescale Semiconductor Inc...
Страница 784: ...Application Information KL27 Sub Family Reference Manual Rev 5 01 2016 784 Freescale Semiconductor Inc...
Страница 830: ...Functional description KL27 Sub Family Reference Manual Rev 5 01 2016 830 Freescale Semiconductor Inc...
Страница 850: ...Application information KL27 Sub Family Reference Manual Rev 5 01 2016 850 Freescale Semiconductor Inc...
Страница 886: ...Functional description KL27 Sub Family Reference Manual Rev 5 01 2016 886 Freescale Semiconductor Inc...