
CHAPTER 8 16-BIT TIMER/EVENT COUNTER 0
Preliminary User’s Manual U16895EJ1V0UD
274
(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. The
CRC0n.CRC0n2 bit is used to set whether to use the CR0n1 register as a capture register or as a compare
register.
The CR0n1 register can be read or written in 16-bit units.
After reset, this register is cleared to 0000H.
CR0n1
(n = 0, 1)
12
10
8
6
4
2
After reset: 0000H
R/W
Address: CR001 FFFFF604H, CR011 FFFFF614H
14
0
13
11
9
7
5
3
15
1
(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.ESn01 and PRM0n.ESn00 bits.
Table 8-4 shows the settings when the valid edge of the TI0n0 pin is specified as the capture trigger.
Table 8-4. Capture Trigger of CR0n1 Register and Valid Edge of TI0n0 Pin
Capture Trigger of CR0n1
Valid Edge of TI0n0 Pin
ESn01
ESn00
Falling edge
0
Rising edge
0
1
Both rising and falling edges
1
Remarks 1. n = 0, 1
2. Setting the ESn01 and ESn00 bits to 10 is prohibited.
Cautions 1. If 0000H is set to the CR0n1 register, an interrupt request signal (INTTM0n1) is
generated after overflow of the TM0n register, after clear & start on a match between
the TM0n register and CR0n0 register, after clear by the valid edge of the TI0n0 pin,
or after clear by a one-shot pulse output trigger.
2. When the P33 and P35 pins are used as the valid edges of TI000 and TI010, and the
timer output function is used, set the P34 and P32 pins as the timer output pins
(TO00, TO01).
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 8.4.2 PPG output operation.