CHAPTER 9 TIMER/COUNTER FUNCTION
341
User’s Manual U15195EJ5V0UD
(9) Timer 2 subchannel 3, 4 capture/compare control register (CMSE340)
The CMSE340 register controls the timer 2 subchannel n sub capture/compare register (CVSEn0) and the
timer 2 subchannel n main capture/compare register (CVPEn0).
This register can be read/written in 16-bit units.
(1/2)
14
0
13
EEVE4
12
BFEE4
2
CCSE3
3
LNKE3
4
BFEE3
5
EEVE3
6
0
7
0
8
TB0E4
9
TB1E4
10
CCSE4
11
LNKE4
15
0
1
TB1E3
0
TB0E3
CMSE340
Address
FFFFF64EH
After reset
0000H
Bit position
Bit name
Function
13, 5
EEVEn
Enables/disables event detection by CMSE340 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 subchannel n sub capture/compare register (CVSEn0) buffer operation.
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 = 3, 4
Содержание PD703114
Страница 2: ...2 User s Manual U15195EJ5V0UD MEMO ...