R01UH0823EJ0100 Rev.1.00
Page 747 of 1823
Jul 31, 2019
RX23W Group
26. 8-Bit Timer (TMR)
26.7
Link Operation by ELC
26.7.1
Event Signal Output to ELC
The TMR uses the event link controller (ELC) to perform link operation to the previously specified module using the
interrupt request signal as the event signal. The TMR outputs compare match A, compare match B, and overflow signals
as event signals. Channels that can be used in this way are TMR0 and TMR2.
The event signal can be output regardless of the setting of the corresponding interrupt request enable bits
(TMR0.TCR.OVIE or TMR2.TCR.OVIE, TMR0.TCR.CMIEA or TMR2.TCR.CMIEA, and TMR0.TCR.CMIEB or
TMR2.TCR.CMIEB). For details, refer to
section 20, Event Link Controller (ELC)
.
The event output function can be used for the cascaded operation.
26.7.2
TMR Operation when Receiving an Event Signal from ELC
The TMR can perform either of the following operations upon the event previously specified by the ELSRn register of
the ELC. However, the ELC does not support the cascaded operation.
(1) Count Start
When the TMR count start operation is selected by the ELOPD register of the ELC and the event specified by ELSRn
occurs, the TCSTR.TCS bit is set to 1, starting the TMR count operation. After the TMR count start operation is selected
by the ELOPD register of the ELC, use the TCCR.CKS[2:0] and CSS[1:0] bits to select the count source.
If the specified event occurs while the TCS bit is 1, the event is ignored.
Write 0 to the TCSTR.TCS bit to stop counting.
When the count start event is input in the count stopped state, the TMR starts counting again according to the CKS[2:0]
and CSS[1:0] bits.
The TCS bit is valid only when the ELOPD.TMR0MD[1:0] and ELOPD.TMR2MD[1:0] bits of the ELC select the count
start operation.
(2) Event Count
When the TMR event count operation is selected by the ELOPD register of the ELC and the event specified by ELSRn
occurs, the events are counted as the count source regardless of the TCCR.CKS[2:0] and CSS[1:0] bit settings. Reading
the counter value returns the number of events that have been actually input.
(3) Count Restart
When the TMR count restart operation is selected by the ELOPD register of the ELC and the event specified by ELSRn
occurs, the TCNT counter value is modified to the initial value. If the CKS[2:0] and CSS[1:0] bit settings are not
disabling the clock input, the count operation is continued.