Datasheet
Section 18 Timer RG
REJ09B0465-0300 Rev. 3.00 Page 663 of 982
Sep 17, 2010
H8S/20103, H8S/20203, H8S/20223, H8S/20115, H8S/20215, H8S/20235 Group
18.3.5 Operation through an Event Link
Using the event link controller (ELC), timer RG can be made to operate in the following ways in
relation to events occurring in other modules.
(1) Staring Counter Operation
The start of counting operations by timer RG can be selected by ELOPC of the ELC. When the
event specified by ELSR8 occur, the STR bit in TRGMDR is set to 1, which starts counting by
timer RG. However, if the specified event occurs when the STR bit has already been set to 1, the
event is not effective.
(2) Counting Event
The counting of events by timer RG can be selected by ELOPC of the ELC. When the event
specified in ELSR8 occurs, event counter operation proceeds with that event as the source to drive
counting, regardless of the setting of TPSC[2:0] bits in TRGCR and the STR bit in TRGMDR.
When the value of the counter is read, the value read out is the actual number of input events.
(3) Input Capture
Input capture operation of timer RG can be selected by ELOPC of the ELC. When the event
specified in ELSR8 occurs, GRB captures the value of TRGCNT. When input capture operation
initiated by an event link is in use, set IOB[2:0] = b'101 in the TRGIOR register of timer RG, set
the STR bit in TRGMDR, and then start the counter. Since input on the TGIOB pin becomes valid
at the same time, fix the input to the TGIOB pin or take other measures such as not allocating the
TGIOB pin to the port in the PMC, etc.