
357
Outline of Complementary PWM Mode Operation: In complementary PWM mode, 6-phase
PWM output is possible. Figure 12.39 illustrates counter operation in complementary PWM
mode, and figure 12.40 shows an example of complementary PWM mode operation.
•
Counter operation
In complementary PWM mode, three counters—TCNT3, TCNT4, and TCNTS—perform
up/down-count operations.
TCNT3 is automatically initialized to the value set in TDDR when complementary PWM
mode is selected and the CST bit in TSTR is 0.
When the CST bit is set to 1, TCNT3 counts up to the value set in TGR3A, then switches to
down-counting when it matches TGR3A,. When the TCNT3 value matches TDDR, the counter
switches to up-counting, and the operation is repeated in this way.
TCNT4 is initialized to H'0000.
When the CST bit is set to 1, TCNT4 counts up in synchronization with TCNT3, and switches
to down-counting when it matches TCDR . On reaching H'0000, TCNT4 switches to up-
counting, and the operation is repeated in this way.
TCNTS is a read-only counter. It need not be initialized.
When TCNT3 matches TCDR during TCNT3 and TCNT4 up/down-counting, down-counting
is started, and when TCNTS matches TCDR, the operation switches to up-counting. When
TCNTS matches TGR3A, it is cleared to H'0000.
When TCNT4 matches TDDR during TCNT3 and TCNT4 down-counting, up-counting is
started, and when TCNTS matches TDDR, the operation switches to down-counting. When
TCNTS reaches H'0000, it is set with the value in TGR3A.
TCNTS is compared with the compare register and temporary register in which the PWM duty
is set during the count operation only.
Counter value
TGR3A
TCDR
TDDR
H'0000
TCNT4
TCNTS
TCNT3
TCNT3
TCNT4
TCNTS
Time
Figure 12.39 Complementary PWM Mode Counter Operation
Summary of Contents for SH7041 Series
Page 2: ......
Page 6: ......
Page 38: ...xvi ...
Page 44: ...6 ...
Page 46: ...8 ...
Page 48: ...10 ...
Page 82: ...44 ...
Page 114: ...76 ...
Page 118: ...80 ...
Page 124: ...86 ...
Page 170: ...132 ...
Page 250: ...212 ...
Page 492: ...454 ...
Page 506: ...468 ...
Page 604: ...566 ...
Page 684: ...646 ...
Page 706: ...668 ...
Page 778: ...740 ...
Page 780: ...742 ...
Page 818: ...780 ...
Page 850: ...812 ...
Page 923: ...SH7040 SH7041 SH7042 SH7043 SH7044 SH7045 Group Hardware Manual REJ09B0044 0600O ...