381
16-bit Timer/Event Counter P (TMP)
Chapter 11
Preliminary User’s Manual U17566EE1V2UM00
Figure 11-17
Software processing flow in external trigger pulse output mode (2/2)
(3)
External trigger pulse output mode operation timing
(a) Note on changing pulse width during operation
To change the PWM waveform while the counter is operating, write the
TPnCCR1 register last.
Rewrite the TPnCCRm register after writing the TPnCCR1 register after
the INTTPnCC0 signal is detected.
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).
Trigger w
a
it
s
t
a
t
us
TPnCCR1 regi
s
ter 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
a
nd 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> PnCCR0, 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 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
<
3
> PnCCR0, 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