BAT32G1x9 user manual | Chapter 6 Universal timer unit Timer4/8
151 / 1149
Rev.1.02
6.3.3
Timer mode register mn (TMRmn).
The TMRmn register is a register that sets the operating mode of channel n, and performs the selection of
the operating clock (fMCK), the selection of the counting clock, the selection of the master/slave, the selection of
16 bits/ Selection of 8-bit timers (channels 1 and 3 only), setting of start and capture triggers, selection of
effective edges of timer inputs, and operating modes (Interval, Capture, Event Counter, Single Count, Capture &
Single Count) setting.
It is forbidden to overwrite the TMRmn register in operation (TEmn=1). However, bit7 and bit6 (CISmn1,
CISmn0) can be rewritten in some function operations (TEmn=1). (For details, please refer to "Independent
Channel Operation Function of 6.8 Universal Timer Unit" and "Multi-channel Linkage Operation Function of 6.9
Timer Array Unit".)).
The TMRmn register is set via a 16-bit memory operation instruction. After generating a reset signal, the
value of the TMRmn register changes to "0000H".
Note that bit11
of the
TMRmn
register
varies by channel.
TMRm2, TMRm4, TMRm6:
MASTERmn bit (n=2, 4, 6)
TMRm1, TMRm3
:
SPLITmn bit (n=1, 3)
TMRm0,
TMRm5,
TMRm7
: Fixed to
"0".
Figure 6-8 Timer mode register mn (TMRmn) (1/4).
symbol
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
RMRMN(
n=2,4,6)
CKSmn
1
CKSmn
0
0
CCSmn
MASTER
mn
STSm
n2
STSm
n1
STSm
n0
CISm
n1
CISm
n0
0
0
MDm
n3
MDm
n2
MDm
n1
MDm
n0
symbol
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
RMRMN
(n=1.3)
CKSmn
1
CKSmn
0
0
CCSmn
SPLITmn
STSm
n2
STSm
n1
STSm
n0
CISm
n1
CISm
n0
0
0
MDm
n3
MDm
n2
MDm
n1
MDm
n0
symbol
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
RMRMN
(n=0,5,7)
CKSmn
1
CKSmn
0
0
CCSmn
0
Note 1
STSm
n2
STSm
n1
STSm
n0
CISm
n1
CISm
n0
0
0
MDm
n3
MDm
n2
MDm
n1
MDm
n0
CKSmn1 CKSmn0
Channel n running clock (fMCK) selection
0
0
The timer clock selects the operating clock CKm0 set by register m (TPSm).
0
1
The timer clock selects the operating clock CKm2 set by register m (TPSm).
1
0
The timer clock selects the operating clock CKm1 set by register m (TPSm).
1
1
The timer clock selects the operating clock CKm3 set by register m (TPSm).
The operating clock (fMCK) is used for edge detection circuitry. The sample clock and count clock
(fTCLK) are generated by setting the CCSmn bit. Only Channels 1 and 3 can select the operating
clocks CKm2 and CKm3.
CCSmn
Selection of channel n count clock (fTCLK).
0
CKSmn0 bits and CKSmn1 bits specify the operating clock (fMCK).
1
The effective edge of the input signal at the TImn pin
• In the case of Unit 0:
Channel 0: The effective edge of the input
signal selected by TIS0
Channel 1: The effective edge of the input
signal selected by TIS0
Channel 3: The effective edge of the input
signal selected by the ISC
The counting clock (fTCLK) is used for counters, output control circuits, and interrupt control circuits.