399
16-bit Timer/Event Counter P (TMP)
Chapter 11
Preliminary User’s Manual U17566EE1V2UM00
Figure 11-24
Software processing flow in PWM output mode (1/2)
TPnCE
b
it = 1
S
etting of TPnCCR0 regi
s
ter
Regi
s
ter initi
a
l
s
etting
TPnCTL0
(TPnCK
S
0 to TPnCK
S
2
b
it
s
)
TPnCTL1,
TPnIOC0,
TPnIOC2,
TPnCCR0,
TPnCCR1
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 i
s
en
ab
led (TPnCE
b
it = 1).
TPnCCR1 write
proce
ss
ing i
s
nece
ssa
ry
only when the
s
et cycle
i
s
ch
a
nged.
When the co
u
nter i
s
cle
a
red
a
fter
s
etting,
the v
a
l
u
e of the TPnCCRm
regi
s
ter i
s
tr
a
n
s
ferred to the
CCRm
bu
ffer regi
s
ter.
S
TART
S
etting of TPnCCR1 regi
s
ter
<1> Co
u
nt oper
a
tion
s
t
a
rt flow
<2> TPnCCR0, TPnCCR1 regi
s
ter
s
etting ch
a
nge flow
S
etting of TPnCCR0 regi
s
ter
When the co
u
nter i
s
cle
a
red
a
fter
s
etting,
the v
a
l
u
e of the TPnCCRm
regi
s
ter i
s
tr
a
n
s
ferred to the
CCRm
bu
ffer regi
s
ter.
S
etting of TPnCCR1 regi
s
ter
<4> TPnCCR0, TPnCCR1 regi
s
ter
s
etting ch
a
nge flow
Only writing of the TPnCCR1
regi
s
ter m
us
t
b
e performed
when the
s
et d
u
ty f
a
ctor i
s
ch
a
nged. When the co
u
nter i
s
cle
a
red
a
fter
s
etting, the
v
a
l
u
e of comp
a
re regi
s
ter m
i
s
tr
a
n
s
ferred to the CCRm
bu
ffer regi
s
ter.
S
etting of TPnCCR1 regi
s
ter
<
3
> TPnCCR0, TPnCCR1 regi
s
ter
s
etting ch
a
nge flow
TPnCE
b
it = 0
Co
u
nting i
s
s
topped.
S
TOP
<5> Co
u
nt oper
a
tion
s
top flow
electronic components distributor