
CHAPTER 7 16-BIT TIMER/EVENT COUNTERS 00 TO 05
User
’
s Manual U15862EJ3V0UD
307
(3) 16-bit timer capture/compare register 0n1 (CR0n1)
The CR0n1 register is a 16-bit register that combines capture register and compare register functions. Bit 2
(CRC0n2) of the CRC0n register is used to set whether to use the CR0n1 register as a capture register or as a
compare register.
(a) When using the CR0n1 register as a compare register
The value set to the CR0n1 register and the count value of the TM0n register are always compared and
when these values match, an interrupt request signal (INTTM0n1) is generated.
(b) When using the CR0n1 register as a capture register
The TM0n register count value is captured to the CR0n1 register by inputting a capture trigger.
The valid edge of the TI0n0 pin can be selected as the capture trigger. The valid edge of the TI0n0 pin is
set with the PRM0n register.
Table 7-4 shows the settings when the valid edge of the TI0n0 pin is specified as the capture trigger.
Table 7-4. Valid Edge of TI0n0 Pin and Capture Trigger of CR0n1 Register
ESn01
ESn00
Valid Edge of TI0n0 Pin
Capture Trigger of CR0n1 Register
0
0
Falling edge
Falling edge
0
1
Rising edge
Rising edge
1
0
Setting prohibited
Setting prohibited
1
1
Both rising and falling edges
Both rising and falling edges
Remark
n = 0 to 5
The CR0n1 register is set by a 16-bit memory manipulation instruction.
RESET input sets this register to 0000H.
Cautions 1. Set a value other than 0000H to the CR0n1 register in the mode in which clear & start
occurs upon a match of the values of the TM0n register and CR0n0 register.
However, if 0000H is set to the CR0n1 register in the free-running mode or the TI0n1
valid edge clear mode, an interrupt request (INTTM0n1) is generated after an
overflow (FFFFH).
2. When the P33, P35, P613, P92, and P94 pins are used as the valid edges of TI000,
TI010, TI020, TI030, and TI051, they cannot be used as timer outputs (TO00 to TO03,
TO05). Moreover, when used as TO00 to TO03 and TO05, these pins cannot be used
as the valid edges of TI000, TI010, TI020, TI030, and TI051.
3. If, when the CR0n1 register is used as a capture register, the register read interval
and capture trigger input conflict, the read data becomes undefined (but the capture
data itself is normal). Moreover, when the count stop input and capture trigger input
conflict, the capture data becomes undefined.
4. The CR0n1 register can be rewritten during TM0n register operation only in the PPG
output mode. Refer to 7.4.2 PPG output operation.