EasyManua.ls Logo

Cmsemicon CMS32L051 - Page 128

Default Icon
703 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
V1.2.2
CMS32L051 User Manual |Chapter 5 Universal Timer Unit (Timer4)
www.mcu.com.cn 128 / 703
Figure 5-12 Table of timer mode register mns (TMRmn) (4/4)
Symbol
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
0
TMRmn
(n=2)
Symbol
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
0
TMRmn
(n=1, 3)
Symbol
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
0
TMRmn
(n=0)
MD
mn3
MD
mn2
MD
mn1
The setting of the
channel n operating
mode
Corresponding functions
The count of TCR
runs
0
0
0
Interval timer mode
Interval timer/square wave output/
Crossover function / PWM output
(master).
Decrement count
0
1
0
Capture mode
Measurement of input pulse intervals
Increment the count
0
1
1
Event counter mode
External event counters
Decrement count
1
0
0
Single count mode
Delay counter/single trigger pulse
output/PWM output
(Subgenerated)
Decrement count
1
1
0
Capture & Single Count
Mode
Measurement of the high and low level
width of the input signal
Increment the count
Others
Settings are forbidden
The operation of each mode varies depending on the MDmn0 bit (refer to the table below).
Operating mode (MDmn3~MDmn1
bit setting (see table above)).
MD
mn0
Start counting and interrupt settings
Interval timer mode (0, 0, 0)
Capture mode (0, 1, 0).
0
No timer interrupt occurs at the start of the count (nor does the
output of the timer change).
1
A timer interrupt is generated at the start of the count (the output of
the timer also changes).
Event counter patterns (0, 1, 1).
0
No timer interrupt occurs at the start of the count (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. No interruption occurs
at this time.
1
The start of the count run triggers a valid
Note
3
. No interruption
occurs at this time.
Capture & Single Count Mode (1,
1, 0).
0
No timer interrupt occurs at the start of the count (nor does the
output of the timer change). The start trigger in the count run is
invalid.
No interruption occurs at this time.
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 start count are not controlled.
3. If a start trigger is generated during operation (TSmn=1), the counter is initialized and the count is restarted (no
interrupt request is generated).
Remark: m: unit number (m=0,1) n: channel number (n=0~3).
CKS
mn1
CKS
mn0
0
CCS
mn
MAS
TERmn
STS
mn2
STS
mn1
STS
mn0
CIS
mn1
CIS
mn0
0
0
MD
mn3
MD
mn2
MD
mn1
MD
mn0
CKS
mn1
CKS
mn0
0
CCS
mn
SPLIT
mn
STS
mn2
STS
mn1
STS
mn0
CIS
mn1
CIS
mn0
0
0
MD
mn3
MD
mn2
MD
mn1
MD
mn0
CKS
mn1
CKS
mn0
0
CCS
mn
0
Note
1
STS
mn2
STS
mn1
STS
mn0
CIS
mn1
CIS
mn0
0
0
MD
mn3
MD
mn2
MD
mn1
MD
mn0

Table of Contents

Related product manuals