
R01UH0336EJ0102 Rev.1.02
Page 905 of 1538
Jul 17, 2014
V850E2/PG4-L
Section 15 TSG2 (TSG20)
(a)
Procedure for Software Output Control
Figure 15-84
Process Flow of Software Output Control
The procedure for software output control is described below.
(1) Set TSnIDC to determine the rotation direction. The phase of the timer
output with TSnIDC = 0 is different by 180 degrees from that with TSnIDC
= 1. The timer output does not change if only this bit is rewritten using the
software output control function. However, if the period match occurs
before step (2), the output pattern of 120-DC control changes. So,
schedule so as to prevent the period match from occurring before step (2).
(2) Set the output pattern to TSnSPC2 to TSnSPC0. To enable software output
control, set TSnSOC to 1 simultaneously.
(3) Change the output pattern setting of TSnSPC2 to TSnSPC0 to change the
timer output. The registers that can be changed during software control
are: TSnTRG1.TSnTT, TSnCTL4 to TSnCTL6, TSnOPT0, TSnOPT1,
TSnCMP0 to TSnCMP12, TSnDTC0, and TSnDTC1.
(4) Confirm that the reload request flag (TSnRSF) = 0. If TSnRFS = 1, do not
proceed to the following step until TSnRSF = 0.
Set the rotation direction
with TSnOPT0.TSnIDC.
Set the output pattern
to TSnOPT1.TSnSPC2
to TSnSPC0
and set TSnSOC
to 1 simultaneously.
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
Repeat as required.
Set TSnSOC to 0.
Write to TSnCMP1.
Write to TSnCMPm
(m = 0, 2 to 12).
NO
Change the setting
of TSnSPC2 to TSnSPC0
and switch the output
pattern.
Reload
TSnSTR0.TSnRSF = 0?
YES
END
START