CHAPTER 9 TIMER/COUNTER FUNCTION
339
User’s Manual U15195EJ5V0UD
(8) Timer 2 subchannel 1, 2 capture/compare control register (CMSE120)
The CMSE120 register controls the timer 2 subchannel n sub capture/compare register (CVSEn0) and the
timer 2 subchannel n main capture/compare register (CVPEn0) (n = 1, 2).
This register can be read/written in 16-bit units.
(1/2)
14
0
13
EEVE2
12
BFEE2
2
CCSE1
3
LNKE1
4
BFEE1
5
EEVE1
6
0
7
0
8
TB0E2
9
TB1E2
10
CCSE2
11
LNKE2
15
0
1
TB1E1
0
TB0E1
CMSE120
Address
FFFFF64CH
After reset
0000H
Bit position
Bit name
Function
13, 5
EEVEn
Enables/disables event detection for CMSE120 register.
0: ED1 and ED2 signal inputs ignored (nothing is done even if these signals are
input).
1: Operation caused by ED1 and ED2 signal inputs enabled.
12, 4
BFEEn
Specifies the buffer operation of subchannel n sub capture/compare register
(CVSEn0).
0: Subchannel n sub capture/compare register (CVSEn0) not used as buffer.
1: Subchannel n sub capture/compare register (CVSEn0) used as buffer.
Caution When the BFEEn bit = 1, a compare match occurs on starting the
timer in the compare register mode because the values of both the
TM2x and CVPEn0 registers are 0 after reset (TM2x = timer/counter
selected by TB1En and TB0En bits (n = 1 to 4)). After that, the value
of the sub register (CVSEn0) is written to the main register (CVPEn0).
Remarks 1.
The operations in the capture register mode and compare register
mode when the subchannel n sub capture/compare register (CVSEn0)
is not used as a buffer are shown below.
•
In capture register mode: The CPU can read both the master register
(CVPEn0) and slave register (CVSEn0). The next event is ignored
until the CPU finishes reading the master register.
TM20 capture is performed by the slave register, and TM21 capture
is performed by the master register.
•
In compare register mode: The CPU writes to the slave register
(CVSEn0), and immediately after, the same contents as those of the
slave register are written to the master register (CVPEn0).
2.
The operations in the capture register mode and compare register
mode when the subchannel n sub capture/compare register (CVSEn0)
is used as a buffer are shown below.
•
In capture register mode: When the CPU reads the master register
(CVPEn0), the master register updates the value held by the slave
register (CVSEn0) immediately before the CPU read operation.
When a capture event occurs, the timer/counter value at that time is
always saved in the slave register.
•
In compare register mode: The CPU writes to the slave register
(CVSEn0) and these contents are transferred to the master register
(CVPEn0) set by the LNKEn bits.
Remark
n = 1, 2