Hysteresis - Silicon Laboratories EFR32xG14 Wireless Gecko Reference Manual

Table of Contents

Advertisement

16.3.2 Hysteresis

By default the pulse counter wraps to 0 when passing the configured top value, and wraps to the top value when counting down from 0.
On these events, a system will likely want to wake up to store and track the overflow count. This is fine if the pulse counter is tracking a
monotonic value or a value that does not change directions frequently. In the latter scenario, if the counter changes directions around
the overflow/underflow point, the system will have to wake up frequently to keep track of the rotations, resulting in higher current con-
sumption.
To solve this, the pulse counter has a way of introducing hysteresis to the counter. When HYST in PCNTn_CTRL is set, the pulse coun-
ter will always wrap to TOP/2 on underflows and overflows. This takes the counter away from the area where it might overflow or under-
flow, removing the problem.
Figure 16.8 PCNT Hysteresis behavior of Counter on page 454
Given a starting value of 0 for the counter, the absolute count value when hysteresis is enabled can be calculated with the equations
Figure 16.9 Absolute Position With Hysteresis and Even TOP Value on page 454
and Odd TOP Value on page
silabs.com | Building a more connected world.
MAX VAL
Overflow wrap
Overflow continue cnt
Overflow continue cnt
MIN VAL
Figure 16.8. PCNT Hysteresis behavior of Counter
454, depending on whether the TOP value is even or odd.
CNT
= CNT - UF
abs
CNT
Figure 16.9. Absolute Position With Hysteresis and Even TOP Value
CNT
= CNT - UF
abs
CNT
Figure 16.10. Absolute Position With Hysteresis and Odd TOP Value
COUNTER
TOP
underflow continue cnt
TOP/2
underflow continue cnt
or
Figure 16.10 Absolute Position With Hysteresis
x (TOP/2+1) + OF
x (TOP/2+1)
CNT
x (TOP/2+1) + OF
x (TOP/2+2)
CNT
Reference Manual
PCNT - Pulse Counter
illustrates the hysteresis behavior.
Underflow warp
Rev. 1.1 | 454

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the EFR32xG14 Wireless Gecko and is the answer not in the manual?

Questions and answers

Table of Contents