![](http://datasheet.mmic.net.cn/120000/R5F21388SDFP_datasheet_3573603/R5F21388SDFP_263.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 232 of 730
Aug 05, 2011
15.3.2
Timer RJ Control Register (TRJCR)
Notes:
2. When 1 (count is forcibly stopped) is written to the TSTOP bit, bits TSTART and TCSTF are initialized at the
same time. The pulse output level is also initialized.
3. Set bits TEDGF and TUNDF to 1 and use the MOV instruction. If the read-modify-write instruction is executed to
set the TRJCR register, bits TEDGF and TUNDF may be erroneously set to 0 depending on the timing.
Count operation is started by writing 1 to the TSTART bit and stopped by writing 0. When the TSTART bit is
set to 1 (count starts), the TCSTF bit is set to 1 (count in progress) in synchronization with the count source.
Also, after 0 is written to the TSTART bit, the TCSTF bit is set to 0 (count stops) in synchronization with the
[Conditions for setting to 0]
When 0 is written to the TSTART bit (the TCSTF bit is set to 0 in synchronization with the count source).
When 1 is written to the TSTOP bit.
[Condition for setting to 1]
When 1 is written to the TSTART bit (the TCSTF bit is set to 1 in synchronization with the count source).
[Condition for setting to 0]
When 0 is written to this bit by a program.
[Conditions for setting to 1]
When the measurement of the active width of the external input (TRJIO) is completed in pulse width
measurement mode.
The set edge of the external input (TRJIO) is input in pulse period measurement mode.
[Condition for setting to 0]
When 0 is written to this bit by a program.
[Condition for setting to 1]
When the counter underflows.
Address 00112h (TRJCR_0)
Bit
b7b6
b5b4b3
b2b1b0
Symbol
After Reset
0
000
0000
Bit
Symbol
Bit Name
Function
R/W
b0
TSTART Timer RJ count start bit
0: Count stops
1: Count starts
R/W
b1
TCSTF
Timer RJ count status flag
0: Count stops
1: Count in progress
R
b2
TSTOP
Timer RJ count forced stop bit
(2)When 1 is written to this bit, the count is forcibly
stopped. The read value is 0.
W
b3
—
Nothing is assigned. The write value must be 0. The read value is 0.
—
b4
TEDGF
Active edge judgement flag
0: No active edge received
1: Active edge received
R/W
b5
TUNDF
Timer RJ underflow flag
0: No underflow
1: Underflow
R/W
b6
—
Nothing is assigned. The write value must be 0. The read value is 0.
—
b7
—