![](http://datasheet.mmic.net.cn/120000/R5F21388SDFP_datasheet_3573603/R5F21388SDFP_264.png)
R8C/38T-A Group
15. Timer RJ
Under development Preliminary document
Specifications in this document are tentative and subject to change.
R01UH0241EJ0010 Rev.0.10
Page 233 of 730
Aug 05, 2011
15.3.3
Timer RJ I/O Control Register (TRJIOC)
Note:
1. Set the TOPCR bit after the setting of the TRJMR register is completed.
The TEDGSEL bit is used to switch the TRJO output polarity and the TRJIO I/O edge and polarity. In pulse
output mode, only the polarities of the TRJO output and the TRJIO output are controlled. The TRJO output and
TRJIO output are initialized when the TRJMR register is written or 1 is written to the TSTOP bit in the TRJCR
register.
Address 00113h (TRJIOC_0)
Bit
b7
b6b5
b4b3b2b1b0
Symbol
After Reset
00000000
Bit
Symbol
Bit Name
Function
R/W
b0
TEDGSEL I/O polarity switch bit
Function varies depending on the operating mode (refer
R/W
b1
TOPCR
TRJIO output control bit
0: TRJIO output enabled (toggle output is started)
1: TRJIO output disabled (toggle output is stopped)
R/W
b2
TOENA
TRJO output enable bit
0: TRJO output disabled (port)
1: TRJO output enabled
R/W
b3
TIOSEL
Event input select bit
0: Input from TRJIO pin
1: Input from hardware LIN
R/W
b4
TIPF0
TRJIO input filter select bits
b5 b4
0 0: No filter
0 1: Filter enabled, sampling at f1
1 0: Filter enabled, sampling at f8
1 1: Filter enabled, sampling at f32
R/W
b5
TIPF1
R/W
b6
TIOGT0
TRJIO count control bits
b7 b6
0 0: Event is counted
0 1: Event is counted only during INT1 high-level
period
1 0: Event is counted during timer RC output signal
period specified by RCCPSEL bit in TRJISR
register
1 1: Do not set.
R/W
b7
TIOGT1
R/W
Table 15.4
TRJIO I/O Edge and Polarity Switching
Operating Mode
Function
Pulse output mode
0: Output is started at high (initialization level is high)
1: Output is started at low (initialization level is low)
Event counter mode
0: Count at rising edge
1: Count at falling edge
Pulse width measurement mode
0: Low-level width is measured
1: High-level width is measured
Pulse period measurement mode
0: Measure from one rising edge to the next rising edge
1: Measure from one falling edge to the next falling edge
Table 15.5
TRJO Output Polarity Switching
Operating Mode
Function
All modes
0: Output is started at low
1: Output is started at high