420
Chapter 11
16-bit Timer/Event Counter P (TMP)
Preliminary User’s Manual U17566EE1V2UM00
11.5.7
Pulse width measurement mode (TPnMD2 to TPnMD0 = 110)
In the pulse width measurement mode, 16-bit timer/event counter P starts
counting when the TPnCTL0.TPnCE bit is set to 1. Each time the valid edge
input to the TIPnm pin has been detected, the count value of the 16-bit counter
is stored in the TPnCCRm register, and the 16-bit counter is cleared to 0000H.
The interval of the valid edge can be measured by reading the TPnCCRm
register after a capture interrupt request signal (INTTPnCCm) occurs.
Select either the TIPn0 or TIPn1 pin as the capture trigger input pin. Specify
“No edge detected” by using the TPnIOC1 register for the unused pins.
When an external clock is used as the count clock, measure the pulse width of
the TIPn1 pin because the external clock is fixed to the TIPn0 pin. At this time,
clear the TPnIOC1.TPnIS1 and TPnIOC1.TPnIS0 bits to 00 (capture trigger
input (TIPn0 pin): No edge detected).
Figure 11-37
Configuration in pulse width measurement mode
TPnCCR0 regi
s
ter
(c
a
pt
u
re)
TPnCE
b
it
TPnCCR1 regi
s
ter
(c
a
pt
u
re)
Edge
detector
Co
u
nt
clock
s
election
Edge
detector
Edge
detector
TIPn0 pin
(extern
a
l
event co
u
nt
inp
u
t/c
a
pt
u
re
trigger inp
u
t)
TIPn1 pin
(c
a
pt
u
re
trigger inp
u
t)
Intern
a
l co
u
nt clock
Cle
a
r
INTTPnOV
s
ign
a
l
INTTPnCC0
s
ign
a
l
INTTPnCC1
s
ign
a
l
16-
b
it co
u
nter
electronic components distributor