411
16-bit Timer/Event Counter P (TMP)
Chapter 11
Preliminary User’s Manual U17566EE1V2UM00
Figure 11-31
Software processing flow in free-running timer mode (capture function)
(2/2)
TPnCE
b
it = 1
Re
a
d TPnOPT0 regi
s
ter
(check overflow fl
a
g).
Regi
s
ter initi
a
l
s
etting
TPnCTL0
(TPnCK
S
0 to TPnCK
S
2
b
it
s
)
TPnCTL1,
TPnIOC1,
TPnOPT0
Initi
a
l
s
etting of the
s
e regi
s
ter
s
i
s
performed
b
efore
s
etting the
TPnCE
b
it to 1.
The TPnCK
S
0 to TPnCK
S
2
b
it
s
c
a
n
b
e
s
et
a
t the
sa
me time when co
u
nting
h
as
b
een
s
t
a
rted (TPnCE
b
it = 1).
S
TART
Exec
u
te in
s
tr
u
ction to cle
a
r
TPnOVF
b
it (CLR TPnOVF).
<1> Co
u
nt oper
a
tion
s
t
a
rt flow
<2> Overflow fl
a
g cle
a
r flow
TPnCE
b
it = 0
Co
u
nter i
s
initi
a
lized
a
nd
co
u
nting i
s
s
topped
b
y
cle
a
ring TPnCE
b
it to 0.
S
TOP
<
3
> Co
u
nt oper
a
tion
s
top flow
TPnOVF
b
it = 1
NO
YE
S
electronic components distributor