CHAPTER 6 16-BIT TIMER 20
116 User’s Manual U15331EJ4V1UD
6.4.3 Capture operation
The capture operation consists of latching the count value of 16-bit timer counter 20 (TM20) into a capture register
in synchronization with a capture trigger, and retaining the count value.
Set TMC20 as shown in Figure 6-8 to allow the 16-bit timer to start the capture operation.
Figure 6-8. Settings of 16-Bit Timer Mode Control Register 20 for Capture Operation
0/1 0/1 0/1 0/1 0/1 0/1 0/1
TOD20 TOF20
CPT201 CPT200
TOC20
TCL201 TCL200
TOE20
TMC20
Count clock selection
Capture edge selection (see Table 6-3)
16-bit capture register 20 (TCP20) starts a capture operation after a CPT20 capture trigger edge is detected, and
latches and retains the count value of 16-bit timer 20. TCP20 fetches the count value within 2 clocks and retains the
count value until the next capture edge detection.
Table 6-3 and Figure 6-9 show the settings of the capture edge and the capture operation timing, respectively.
Table 6-3. Settings of Capture Edge
CPT201 CPT200 Capture Edge Selection
0 0 Capture operation prohibited
0 1 CPT20 pin rising edge
1 0 CPT20 pin falling edge
1 1 CPT20 pin both edges
Caution Because TCP20 is rewritten when a capture trigger edge is detected during TCP20 read, disable
capture trigger edge detection during TCP20 read.
Figure 6-9. Capture Operation Timing (with Both Edges of CPT20 Pin Specified)
Count clock
TM20
Count read buffer
TCP20
CPT20
0000H
0000H
0001H
0001H
Undefined
N
N
N
M 1 M
M
M
Capture start Capture start
Capture edge detection Capture edge detection
Remark N, M = 0000H to FFFFH