X90 mobile modules
X90 mobile system User's manual V 1.20 - Translation of the original manual
303
5.5.1.7.3.3 Counter configuration
Name:
cfgCounterMode01 to cfgCounterMode10
The functionality of the counter can be configured with these registers.
Example:
Set prescaler:
12.5 MHz
Displayed counter value:
2500
Frequency:
12.5 MHz / 2500 = 5 kHz
Period duration:
1 / 5 kHz = 200 µs
Data type
Values
UINT
See the bit structure.
Bit structure:
Bit
Description
Value
Information
0000
Off
0001
Edge counters
0 to 3
Counter module of counter x
0010
Period measurement
00
Falling edges are counted.
01
Rising edges are counted.
4 to 5
Edge detection
10
All edges are counted.
00000
50 MHz
00001
25 MHz
00010
12.5 MHz
00011
6.25 MHz
00100
3.125 MHz
00101
1.5625 MHz
00110
7881.25 kHz
00111
390.625 kHz
01000
195.312 kHz
01001
97.656 kHz
01010
48.828 kHz
01011
24.414 kHz
01100
6.103 kHz
01101
3.051 kHz
01110
1.525 kHz
8 to 12
Prescaler (only for period measurement)
10000
763 Hz
5.5.1.7.3.4 Counter timeout
Name:
cfgCounterTimeout01 to cfgCounterTimeout10
A timeout for period measurement is set in these registers. If an edge is not detected in the specified time frame,
the corresponding counter is set to 0.
Data type
Values
UINT
See the bit structure.
Bit structure:
Bit
Values
Information
0 to 15
10 to 50,000
(1 ms to 5 s)
(1 LSB = 100 µs)
Timeout for counter x