S0IN
S1IN
CNT
3
4
5
6
7
8
3
4
5
6
7
2
8
Period > 125 us
Figure 16.5. PCNT Oversampling Quadrature Decoder 2X Mode
S0IN
S1IN
3
4
5
6
7
8
9
10
11
3
4
5
6
7
8
9
10 11
2
2
CNT
Period > 125 us
Figure 16.6. PCNT Oversampling Quadrature Decoder 4X Mode
The above modes, by default are prone to flutter effects in the inputs PCNTn_S0IN and PCNTn_S1IN. When this occurs, the counter
changes directions rapidly causing DIRCNG interrupts and unnecessarily waking the core. To prevent this, set FLUTTERRM in
PCNTn_OVSCFG register. When enabled, flutter is removed, thus preventing unnecessary wakeup of the core. The flutter removal log-
ic works by preventing update of the counter value if the wheel keeps changing direction as a result of flutter. The counter is only upda-
ted if the current and previous state transition of the rotation are in the same direction. These state transitions are quadrature decoder
mode specific. The highlighted state transitions in
Figure 16.3 PCNT State Transitions for Different Oversampling Quadrature Decoder
are the ones considered for the different quadrature decoder modes.
Figure 16.7 PCNT Oversampling Quadrature
Decoder with Flutter Removal on page 453
shows how the counter is updated for the different quadrature decoder modes with flutter
removal FLUTTERRM enabled in PCNTn_OVSCFG.
S0IN
S1IN
1
2
3
4
5
6
7
8
9
0
CNT
QUAD4X
8
6
5
4
5
6
7
8
1
2
3
4
0
5
4
3
4
5
1
2
0
3
2
3
S0IN Flutter
S1IN Flutter
CNT
QUAD2X
CNT
QUAD1X
7
9
S0
STATES
S1
S2
S3
S0
S1
S2
S3
S0
S1
S3
S0
S1
S0
S2
S3
S1
S0
S0 S3
S0
S2
S3
S1
S0
S1
Figure 16.7. PCNT Oversampling Quadrature Decoder with Flutter Removal
Reference Manual
PCNT - Pulse Counter
silabs.com
| Building a more connected world.
Rev. 1.1 | 453