
342
The TSR register TCFD bit is a count direction flag. Read the TCFD flag to confirm whether the
TCNT is incrementing or decrementing.
Table 12.8 shows the correspondence between channels and external clock pins.
Table 12.8
Phase Counting Mode Clock Input Pins
Channel
A Phase Input Pin
B Phase Input Pin
1
TCLKA
TCLKB
2
TCLKC
TCLKD
Procedure for Selecting the Phase Counting Mode (Figure 12.29):
1.Set the MD3–MD0 bits of the timer mode register (TMDR) to select the phase counting mode.
2.Set the CST bit of the timer start register (TSTR) to 1 to start the count.
Phase counting mode
Select phase counting mode
Start counting
Phase counting mode
1
2
Figure 12.29 Procedure for Selecting the Phase Counting Mode
Phase Counting Operation Examples: The phase counting mode uses the phase difference
between two external clocks to increment/decrement the TCNT counter. There are 4 modes,
depending on the count conditions.
Phase Counting Mode 1: Figure 12.30 shows an example of phase counting mode 1 operation.
Table 12.9 lists the up counting and down counting conditions for the TCNT.
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 ...