400
Chapter 11
16-bit Timer/Event Counter P (TMP)
Preliminary User’s Manual U17566EE1V2UM00
(3)
PWM output mode operation timing
(a) 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 INTTPnCC1 signal is detected.
To transfer data from the TPnCCRm register to the CCRm buffer register,
the TPnCCR1 register must be written.
To change both the cycle and active level of the PWM waveform at this
time, first set the cycle to the TPnCCR0 register and then set the active
level to the TPnCCR1 register.
To change only the cycle of the PWM waveform, first set the cycle to the
TPnCCR0 register, and then write the same value to the TPnCCR1
register.
To change only the active level width (duty factor) of the PWM waveform,
only the TPnCCR1 register has to be set.
After data is written to the TPnCCR1 register, the value written to the
TPnCCRm register is transferred to the CCRm buffer register in
synchronization with clearing of the 16-bit counter, and is used as the
value compared with the 16-bit counter.
To write the TPnCCR0 or TPnCCR1 register again after writing the
TPnCCR1 register once, do so after the INTTPnCC0 signal is generated.
Otherwise, the value of the CCRm buffer register may become undefined
because the timing of transferring data from the TPnCCRm register to the
CCRm buffer register conflicts with writing the TPnCCRm register.
FFFFH
16-
b
it co
u
nter
0000H
TPnCE
b
it
TPnCCR0 regi
s
ter
CCR0
bu
ffer regi
s
ter
TPnCCR1 regi
s
ter
CCR1
bu
ffer regi
s
ter
TOPn1 pin o
u
tp
u
t
INTTPnCC0
s
ign
a
l
D
10
D
00
D
00
D
01
D
00
D
10
D
11
D
10
D
11
D
01
D
10
D
10
D
00
D
00
D
11
D
11
D
01
D
01
electronic components distributor