353
16-bit Timer/Event Counter P (TMP)
Chapter 11
Preliminary User’s Manual U17566EE1V2UM00
(7)
TPnCCR0 - TMPn capture/compare register 0
The TPnCCR0 register can be used as a capture register or a compare
register depending on the mode.
This register can be used as a capture register or a compare register only in
the free-running timer mode, depending on the setting of the
TPnOPT0.TPnCCS0 bit. In the pulse width measurement mode, the TPnCCR0
register can be used only as a capture register. In any other mode, this register
can be used only as a compare register.
The TPnCCR0 register can be read or written during operation.
Access
This register can be read/written in 16-bit units.
Address
<base> + 6
H
Initial Value
0000
H
. This register is initialized by any reset.
(a) Function as compare register
The TPnCCR0 register can be rewritten even when the TPnCTL0.TPnCE
bit = 1.
The set value of the TPnCCR0 register is transferred to the CCR0 buffer
register. When the value of the 16-bit counter matches the value of the
CCR0 buffer register, a compare match interrupt request signal
(INTTPnCC0) is generated. If TOPn0 pin output is enabled at this time, the
output of the TOPn0 pin is inverted.
When the TPnCCR0 register is used as a cycle register in the interval timer
mode, external event count mode, external trigger pulse output mode, one-
shot pulse output mode, or PWM output mode, the value of the 16-bit
counter is cleared (0000H) if its count value matches the value of the
CCR0 buffer register.
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
CCR0 value
R/W
electronic components distributor