English
Language : 

SH7058 Datasheet, PDF (408/1130 Pages) Renesas Technology Corp – Renesas SuperHTM RISC engine
11, and it is not possible to set different first-stage division ratios for each. Channels 6, 7, and 10
each have a first-stage prescaler, and different first-stage division ratios can be set for each.
11.3.2 Free-Running Counter Operation and Cyclic Counter Operation
The free-running counters (TCNT) in ATU-II channels 0 to 5 and 11 start counting up as free-
running counters when the corresponding timer start register (TSTR) bit is set to 1. When TCNT
overflows (channel 0: from H'FFFFFFFF to H'00000000; channels 1 to 5 and 11: from H'FFFF to
H'0000), the OVF bit in the timer status register (TSR) is set to 1. If the OVE bit in the
corresponding timer interrupt enable register (TIER) is set to 1 at this time, an interrupt request is
sent to the CPU. After overflowing, TCNT starts counting up again from H'00000000 or H'0000.
If the TSTR value is cleared to 0 during TCNT operation, the corresponding TCNT halts. In this
case, TCNT is not reset. If external output is being performed from the GR for the corresponding
TCNT, the output value does not change.
Channel 0 free-running counter operation is shown in figure 11.13.
Pφ
TSTR
STR0
TCNT0
Clock
TCNT0
TSR0
OVF0
00000001
00000002 00000003 00000004 00000005 00000006 FFFFFFFD FFFFFFFE FFFFFFFF 00000000 00000001 00000002
Cleared by software
Figure 11.13 Free-Running Counter Operation and Overflow Timing
The free-running counters (TCNT) in ATU-II channels 6 and 7 perform cyclic count operations
unconditionally. With channel 3 to 5 free-running counters (TCNT), when the corresponding
T3PWM to T5PWM bit in the timer mode register (TMDR) is set to 1, or the corresponding CCI
bit in the timer I/O control register (TIOR) is set to 1 when bits T3PWM to T5PWM are 0, the
counter for the relevant channel performs a cyclic count. The relevant TCNT counter is cleared by
a compare-match of TCNT with GR3D, GR4D, or GR5D in channel 3 to 5, or CYLR in channels
6 and 7 (counter clear function). TCNT starts counting up as a cyclic counter when the
corresponding STR bit in TSTR is set to 1 after the TMDR setting is made. When the count value
matches the GR3D, GR4D, GR5D, or CYLR value, the corresponding IMF3D, IMF4D, or IMF5D
bit in the timer status register (TSR) (or the CMF bit in TSR6 or TSR7 for channels 6 and 7) is set
to 1, and TCNT is cleared to H'0000 (H'0001 in channels 6 and 7).
Rev. 3.0, 09/04, page 367 of 1086