R01UH0823EJ0100 Rev.1.00
Page 692 of 1823
Jul 31, 2019
RX23W Group
25. 16-Bit Timer Pulse Unit (TPUa)
(1) Example of Buffer Operation Setting Procedure
shows an example of the buffer operation setting procedure.
Figure 25.14
Example of Buffer Operation Setting Procedure
(2) Examples of Buffer Operation
(a) When TPUm.TGRy is an output compare register
shows an operation example in which PWM mode 1 has been set for TPU0, and buffer operation has been
set for TPU0.TGRB and TPU0.TGRD. The settings used in this example are TPU0.TCNT clearing by compare match A,
high output at compare match B, and low output at compare match A.
As buffer operation has been set, when compare match A occurs, the output changes and the TPU0.TGRD value is
simultaneously transferred to TPU0.TGRB. This operation is repeated each time compare match B occurs.
For details on PWM modes, see
Figure 25.15
Example of Buffer Operation (1)
Select TGRy function
Buffer operation
Set buffer operation
Start count
<Buffer operation>
[1]
[2]
[3]
[1] Set TGRy as an input capture register or output
compare register by TIOR (y = A to D).
[2] Set TGRy for buffer operation with bits BFA and
BFB in TMDR.
[3] Set the TPU.TSTR.CSTj bit (j = 0 to 5) to 1 to start
the counter operation.
TCNT value
TPU0.TGRA
0000h
TPU0.TGRD
Time
TPU0.TGRB
0200h
0520h
TIOCB0
0200h
0450h
0520h
0450h
TPU0.TGRB
0450h
0200h
Transfer