RX610 Group
16. Programmable Pulse Generator (PPG)
R01UH0032EJ0120 Rev.1.20
Page 555 of 1006
Feb 20, 2013
(2)
PPG1 Setting
No
Yes
Select TGR functions
Set TGR values
Set counting operations
Select interrupt sources
Set initial output values
Enable pulse output
Select output triggers
Set next pulse
output values
Start counter
Set next pulse
output values
Compare match A?
Non-overlapping
pulse output
Set non-overlapping groups
PPG1 setup
TPU (units 0 and 1) setup
TPU (units 0 and 1) setup
[1]
In the case of unit 0, set TIOR of the TPU to make
TGRA and TGRB output compare registers (output
disabled).
In the case of unit 1, set TIOR of the TPU to make
TGRA and TGRB output compare registers (toggle
output).
[2]
Set the pulse output trigger period in TGRB and the
non-overlap period in TGRA.
[3]
Select the counter clock source with the TPSC[2:0]
bits in TCR.
Select the counter clear source with the CCLR[2:0]
bits.
[4] Enable the TGIA interrupt in TIER. The DTC or
DMAC can also be set up to transfer data to NDR.
[5]
Set the initial output values in PODR.
[6] Set the bits for the pins to be used for pulse output
to 1.
[7]
Select the TPU compare match event to be used as
the pulse output trigger in PTRSLR and PCR.
[8] In PMR, select the groups that will operate in non-
overlap mode.
[9] Set the next pulse output values in NDR.
[10] Set the CST bit in TSTR to 1 to start the TCNT
counter.
[11] At each TGIA interrupt, set the next output values in
NDR.
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
Figure 16.12 Sample Setup Procedure for Non-Overlapping Pulse Output (PPG1 Setting)