Rev. 2.00, 09/03, page 344 of 690
•
Free-running count operation and periodic count operation
Immediately after a reset, the TPU’s TCNT counters are all designated as free-running
counters. When the relevant bit in TSTR is set to 1 the corresponding TCNT counter starts up-
count operation as a free-running counter. When TCNT overflows (from H'FFFF to H'0000),
the TCFV bit in TSR is set to 1. After overflow, TCNT starts counting up again from H'0000.
Figure 14.3 illustrates free-running counter operation.
TCNT value
H'FFFF
H'0000
CST bit
TCFV
Time
Figure 14.3 Free-Running Counter Operation
When compare match is selected as the TCNT clearing source, the TCNT counter for the relevant
channel performs periodic count operation. The TGR register for setting the period is designated
as an output compare register, and counter clearing by compare match is selected by means of bits
CCLR2 to CCLR0 in TCR. After the settings have been made, TCNT starts up-count operation as
a periodic counter when the corresponding bit in TSTR is set to 1. When the count value matches
the value in TGR, the TGF bit in TSR is set to 1 and TCNT is cleared to H'0000.
After a compare match, TCNT starts counting up again from H'0000.
Figure 14.4 illustrates periodic counter operation.
TCNT value
TGRA
H'0000
CST bit
TGFA
Time
Counter cleared by TGRA
compare match
Flag cleared by software
Figure 14.4 Periodic Counter Operation
Содержание SH7705
Страница 2: ......
Страница 46: ...Rev 2 00 09 03 page xlvi of xlvi Appendix Table A 1 I O Port States in Each Processing State 679 ...
Страница 70: ...Rev 2 00 09 03 page 24 of 690 ...
Страница 194: ...Rev 2 00 09 03 page 148 of 690 ...
Страница 284: ...Rev 2 00 09 03 page 238 of 690 ...
Страница 338: ...Rev 2 00 09 03 page 292 of 690 ...
Страница 354: ...Rev 2 00 09 03 page 308 of 690 ...
Страница 374: ...Rev 2 00 09 03 page 328 of 690 ...
Страница 420: ...Rev 2 00 09 03 page 374 of 690 ...
Страница 476: ...Rev 2 00 09 03 page 430 of 690 ...
Страница 482: ...Rev 2 00 09 03 page 436 of 690 ...
Страница 552: ...Rev 2 00 09 03 page 506 of 690 ...
Страница 630: ...Rev 2 00 09 03 page 584 of 690 ...
Страница 739: ...SH7705 Group Hardware Manual REJ09B0082 0200O ...