![Cmsemicon BAT32G1 9 Series Скачать руководство пользователя страница 154](http://html1.mh-extra.com/html/cmsemicon/bat32g1-9-series/bat32g1-9-series_user-manual_2627609154.webp)
BAT32G1x9 user manual | Chapter 6 Universal timer unit Timer4/8
154 / 1149
Rev.1.02
Figure 6-11 timer mode register mn(TMRmn) (4/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
MD
mn3
MD
mn2
MD
mn1
Setting of channel n
operating mode
Corresponding functions
The count of TCR
runs
0
0
0
Interval timer mode
Interval timer/square wave output/
Divider function/PWM
output (master).
Decrement the
count
0
1
0
Capture mode
Input the measurement of the pulse
interval
Increment the count
0
1
1
Event counter pattern
External event counters
Decrement the
count
1
0
0
Single count mode
Delay counter/single trigger pulse
output/PWM
output
(Subordinate)
Decrement the
count
1
1
0
Capture &
Single Count
mode
Measurement of the high and low level
width of the input signal
Increment the count
Other than the
above
Disable settings.
The operation of each mode varies depending on the MDmn0 bit (see the table below).
Operating mode (MDmn3~MDmn1
bit setting
(refer to table
above)).
MD
mn0
Start count and interrupt settings
•
•
Interval timer mode (0,
0,
0)
capture mode (0,
1,
0).
0
No timer interrupt is generated at the start of counting (nor does the
output of the timer change).
1
A timer interrupt is generated at the start of counting (the output of
the timer also changes).
•
Event counter pattern (0,
1,
1).
0
No timer interrupt is generated at the start of counting (nor does the
output of the timer change).
•
Single count mode
Note
2
(1,
0,
0).
0
The start trigger in the count run is invalid. There is no interruption
at this point.
1
Count the start of the run to trigger valid
note
3
. There is no
interruption at this point.
•
Capture &
Single Count mode (1,
1,
0).
0
No timer interrupt is generated at the start of counting (nor does
the output of the timer change). The start trigger in the count run is
invalid.
There is no interruption at this point.
Note: 1
bit11
is a read-only bit, fixed to
"0", ignoring write operations.
2. In single count mode, the interrupt output (INTTMmn) and
TOmn
output at the start of counting are not
controlled.
3. If a start trigger (TSmn=1) is generated during the run, the counter is initialized and the count is restarted
(no interrupt request is generated). Note: m: unit number (m=0,1) n: channel number (when m=0: n=0~3, m=1:
n=0~7).