English
Language : 

SH7058 Datasheet, PDF (403/1130 Pages) Renesas Technology Corp – Renesas SuperHTM RISC engine
free-running counter (TCNT3 to TCNT5) and four 16-bit general registers (GR3A to GR3D,
GR4A to GR4D, GR5A to GR5D). TCNT3 to TCNT5 are up-counters that perform free-running
operation. In addition, counter clearing can be performed by compare-match by making a setting
in the timer I/O control register (TIOR3A, TIOR3B, TIOR4A, TIOR4B, TIOR5A, TIOR5B).
Each counter can generate an interrupt request when it overflows.
The four general registers (GR3A to GR3D, GR4A to GR4D, GR5A to GR5D) each have
corresponding external signal I/O pins (TIO3A to TIO3D, TIO4A to TIO4D, TIO5A to TIO5D),
and can be used as input capture or output compare registers. When used for input capture, the
free-running counter (TCNT3 to TCNT5) value is captured by means of input from the
corresponding external signal I/O pin (TIO3A to TIO3D, TIO4A to TIO4D, TIO5A to TIO5D).
Rising edge, falling edge, or both edges can be selected for the input capture signal in the timer
I/O control registers (TIOR3A, TIOR3B, TIOR4A, TIOR4B, TIOR5A, TIOR5B). Also, in use for
input capture, input capture can be performed using a compare-match between a channel 9 event
counter (ECNT9A to ECNT9D), described later, and a general register (GR9A to GR9D) as the
trigger (channel 3 only). In this case, capture is performed even if an input capture disable setting
has been made for TIOR3A to TIOR3D. When used for output compare, compare-match with the
free-running counter (TCNT3 to TCNT5) is performed. For the output from the external signal I/O
pins by compare-match, 0 output, 1 output, or toggle output can be selected in the timer I/O
control registers (TIOR3A, TIOR3B, TIOR4A, TIOR4B, TIOR5A, TIOR5B). An interrupt can be
requested on the occurrence of the respective input capture or compare-match. However, in the
case of input capture using channel 9 as a trigger, an interrupt request from channel 3 cannot be
used.
By selecting PWM mode in the timer mode register (TMDR), PWM output can be obtained, with
three outputs for each. In this case, GR3D, GR4D, and GR5D are automatically used as cycle
registers, and GR3A to GR3C, GR4A to GR4C, GR5A to GR5C, as duty registers. TCNT3 to
TCNT5 are cleared by the corresponding GR3D, GR4D, or GR5D compare-match.
Channels 6 and 7: Channels 6 and 7 each have 16-bit free-running counters (TCNT6A to
TCNT6D, TCNT7A to TCNT7D), 16-bit cycle registers (CYLR6A to CYLR6D, CYLR7A to
CYLR7D), 16-bit duty registers (DTR6A to DTR6D, DTR7A to DTR7D), and buffer registers
(BFR6A to BFR6D, BFR7A to BFR7D). Channels 6 and 7 also each have external output pins
(TO6A to TO6D, TO7A to TO7D), and can be used as buffered PWM timers. The TCNT registers
are up-counters, and 0 is output to the corresponding external output pin when the TCNT value
matches the DTR value (when DTR ≠ CYLR). When the TCNT value matches the CYLR value
(when DTR ≠ H'0000), 1 is output to the external output pin, TCNT is initialized to H'0001, and
the BFR value is transferred to DTR. Thus, the configuration of channels 6 and 7 enables them to
perform waveform output with the CYLR value as the cycle and the DTR value as the duty, and to
use BFR to absorb the time lag between setting of data in DTR and compare-match occurrence.
When DTR = CYLR, 1 is output continuously to the external output pin, giving a duty of 100%.
When DTR = H'0000, 0 is output continuously to the external output pin, giving a duty of 0%. Do
not set a value in DTR that will result in the condition DTR > CYLR. To set H'0000 to DTR, not
Rev. 3.0, 09/04, page 362 of 1086