
R01UH0336EJ0102 Rev.1.02
Page 871 of 1538
Jul 17, 2014
V850E2/PG4-L
Section 15 TSG2 (TSG20)
(a)
Procedure on Software Output Control Processing
Figure 15-60
Flow of Software Output Control
The procedure for software output control is described below.
(1) Set TSnOPT0 to determine the rotation direction. The timer output has a
180-degree phase shift between when TSnIDC = 0 and when TSnIDC = 1.
With the software output control function, the timer output will not change
only by rewriting the TSnOPT0 bit.
(2) Set the pattern for output to TSnOPT1. At the same time, set
TSnOPT0.TSnSOC to 1 to switch to software output control mode.
(3) Change the output pattern setting for TSnSPC2-TSnSPC0 to change the
timer output. During software control mode, the following registers can be
modified:
TSnTRG0.TSnTS, TSnCTL3-TSnCTL6, TSnOPT0, TSnOPT1, TSnCMP0-
TSnCMP12, TSnDTC0, and TSnDTC1.
(4) Ensure that the reload request flag TSnSTR0.TSnRSF is 0. If TSnRSF is 1,
do not shift to the following procedure until it goes 0.
(5) By clearing TSnSOC to 0, software control starts to be released (not yet
released here).
YES
NO
START
END
Set rotation direction
with TSnOPT0.TSnIDC
Set pattern for output
to TSnOPT1.TSnSPC2
to TSnSPC0
and set TSnSOC to 1
Change TSnSPC2 to
TSnSPC0 setting
to switch output pattern
Repeat as necessary.
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
TSnSTR0.
TSnRSF flag = 0?
Set TSnSOC = 0
Write to
TSnUPW (TSnCMP1)
Reload execution
Write to
TSnCMPm, TSnVPW,
TSnWPW (m = 0, 2, 6, 10)
Содержание V850 Series
Страница 1556: ...V850E2 PG4 L R01UH0336EJ0102 Back Cover ...