...the world's most energy friendly microcontrollers
2014-07-02 - Tiny Gecko Family - d0034_Rev1.20
324
www.silabs.com
Bit
Name
Reset
Access
Description
Value
Mode
Description
0
BOTH
Counts up on up-count and down on down-count events.
1
UP
Only counts up on up-count events.
2
DOWN
Only counts down on down-count events.
3
NONE
Never counts.
9
S1CDIR
0
RW
Count direction determined by S1
S1 gives the direction of counting when in the OVSSINGLE or EXTCLKSINGLE modes. When S1 is high, the count direction is given
by CNTDIR, and when S1 is low, the count direction is the opposite
8
HYST
0
RW
Enable Hysteresis
When hysteresis is enabled, the PCNT will always overflow and underflow to TOP/2.
7:6
Reserved
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
5
RSTEN
0
RW
Enable PCNT Clock Domain Reset
The PCNT clock domain is asynchronously held in reset when this bit is set. The reset is synchronously released two PCNT clock
edges after this bit is cleared. If external clock used the reset should be performed by setting and clearing the bit without pending
for SYNCBUSY bit.
4
FILT
0
RW
Enable Digital Pulse Width Filter
The filter passes all high and low periods that are at least 5 clock cycles long. This filter is only available in OVSSINGLE mode.
3
EDGE
0
RW
Edge Select
Determines the polarity of the incoming edges. This bit should be written when PCNT is in DISABLE mode, otherwise the behavior
is unpredictable. This bit is ignored in EXTCLKSINGLE mode.
Value
Mode
Description
0
POS
Positive edges on the PCNTn_S0IN inputs are counted in OVSSINGLE mode.
1
NEG
Negative edges on the PCNTn_S0IN inputs are counted in OVSSINGLE mode, and
the counter direction is inverted in EXTCLKQUAD mode.
2
CNTDIR
0
RW
Non-Quadrature Mode Counter Direction Control
The direction of the counter must be set in the OVSSINGLE and EXTCLKSINGLE modes. This bit is ignored in EXTCLKQUAD mode
as the direction is automatically detected.
Value
Mode
Description
0
UP
Up counter mode.
1
DOWN
Down counter mode.
1:0
MODE
0x0
RW
Mode Select
Selects the mode of operation. The corresponding clock source must be selected from the CMU.
Value
Mode
Description
0
DISABLE
The module is disabled.
1
OVSSINGLE
Single input LFACLK oversampling mode (available in EM0-EM2).
2
EXTCLKSINGLE
Externally clocked single input counter mode (available in EM0-EM3).
3
EXTCLKQUAD
Externally clocked quadrature decoder mode (available in EM0-EM3).
20.5.2 PCNTn_CMD - Command Register (Async Reg)
For more information about Asynchronous Registers please see Section 5.3 (p. 20) .
Offset
Bit Position
0x004
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Reset
0
0
Access
W1
W1
Name
Summary of Contents for EFM32TG
Page 543: ......