
334
Procedure for Setting Buffer Mode (Figure 12.19):
1.Use the timer I/O control register (TIOR) to set the TGR as either an input capture or output
compare register.
2.Use the timer mode register (TMDR) BFA, and BFB bits to set the TGR for buffer mode.
3.Set the CST bit in the TSTR to 1 to start the count operation.
1
2
3
Select TGR function
Buffer mode
Select buffer mode
Start counting
Buffer mode
Figure 12.19 Buffer Operation Setting Procedure
Buffer Operation Examples—when TGR Is an Output Compare Register: Figure 12.20
shows an example of channel 0 set to PWM mode 1, and the TGRA and TGRC registers set for
buffer operation.
The TCNT counter is cleared by a compare-match B, and the output is a 1 upon compare-match A
and 0 output upon compare-match B. Because buffer mode is selected, a compare-match A
changes the output, and the buffer register TGRC value is simultaneously transferred to the
general register TGRA. This operation is repeated with each occurrence of a compare-match A.
See section 12.4.6, PWM Mode, for details on the PWM mode.
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 ...