![](http://datasheet.mmic.net.cn/Renesas-Electronics-America/UPD78F1235GK-GAJ-AX_datasheet_99860/UPD78F1235GK-GAJ-AX_416.png)
CHAPTER 7 INVERTER CONTROL FUNCTIONS
User’s Manual U19678EJ1V1UD
414
Slave channels 1 and 5 are not used as PWM output functions with dead times.
Dead time is controlled by using slave channel p (p = 2, 6) and slave channel q (q = 3, 7) in combination. The
triangular wave PWM output function with dead time uses master channel 0, slave channel 2, and slave channel 3,
and master channel 4, slave channel 6, and slave channel 7 in combination.
TCRp of slave channel p operates in the up and down count mode, and counts the duty. TCRp loads the value of
TDRp at the first count clock, after the channel start trigger bit (TSp) is set to 1. Hereafter, counting up and counting
down is switched in accordance with the operation of the master channel. INTTMp is output when TCRp becomes
0001H.
TCRp loads the value of TDRp again when INTTMn is generated in an up status of the master channel. Similar
operation is continued hereafter.
TCRq of slave channels 3, 7 operates in the one-count mode, and counts the dead time.
TCRq loads the value of TDRq and counts down by using count start timing and INTTMp of slave channels 2, 6 as
the start trigger. When TCRq becomes 0000H, it outputs INTTMq and stops counting until the next start trigger is
input (INTTMp of slave channels 2, 6). INTTMq of slave channels 3, 7 cannot be used, because the number of times
it occurs within the carrier cycle period cannot be specified (0 to 3 times).
A triangular wave modulation PWM waveform with dead time is output by changing TOp and TOq by the count
operation (INTTMp, INTTMq) of slave channels 2, 6 (duty) and slave channels 3, 7 (dead time). A positive-phase
waveform and a reverse-phase waveform are output by controlling the TOLp and TOLq bits of the TOL0 registers of
slave channels 2, 6 and slave channels 3, 7.
It is also possible to specify whether to add dead time to the positive logic output or the inverted logic output by
setting TOLp and TOLq. When TOLp or TOLq is set to 0, a positive-phase waveform to which dead time has been
added on the positive logic side of the PWM duty is output.
When TOLp or TOLq is set to 1, a reverse-phase
waveform to which dead time has been added on the inverted logic side of the PWM duty is output (TOLq = 1 when
TOLp = 0, and TOLq = 0 when TOLp = 1).
Note that the active level of TOp and TOq can be changed by setting the TLS2, TLS3, TLS6, and TLS7 bits of the
OPMR register.
The set condition of TOp (TOLp = 0) is the generation of INTTMq by the operation of slave channels 3, 7, which
uses the generation of INTTMp while the TCRp register counts down as the start trigger. The reset condition of TOp
(TOLp = 0) is the generation of INTTMp of slave channels 2, 6 while TCRp counts up.
The set condition of TOq (TOLq = 1) is the generation of INTTMp while the TCRp register counts down. The reset
condition of TOq (TOLq = 0) is the generation of INTTMq by the operation of slave channels 3, 7, which uses the
generation of INTTMp while TCRp counts down as the start trigger.
If the set conditions and reset conditions of TOp and TOq conflict, the set conditions take precedence.
The PWM waveform with dead time can be switched between positive and negative phases for slave channels 2, 6
and 3, 7 by setting TOLp and TOLq.
Cautions 1.
TDRn of master channel n must be rewritten during an up status period of slave channels 2, 6
(The count status is judged by CSF (TSRp register) of the slave channel or the TOn output
level of the master channel).
When the value of TDRn is rewritten during a down status
period, the periods of the down status and up status differ and an expected waveform cannot
be output, because the value of TDRn of the rewritten master channel becomes valid at the
next period.
2. TSn, TSp, or TSq cannot be set to “1” (forcible restart) while TEn = 1, TEp = 1, or TEq = 1. If
TSn, TSp, or TSq is set to “1” while TEn = 1, TEp = 1, or TEq = 1, the counter value (TCRn,
TCRp, or TCRq) will be illegal and TOn, TOp, or TOq will not be able to output the expected
waveform.