28.3.6 Sensor Evaluation
When a measurement phase is completed, the sensor data is evaluated by the evaluation block. If the sensor data is taken from ACMP
sample in a single point in time (CHx_INTERACT_SAMPLE = ACMP), the evaluation is limited to determining if the sensor data is 0 or
1. For the other sample modes, there are three ways to do sensor evaluation; threshold comparison, sliding window, or step detection.
Evaluation mode is configured in CHx_EVAL_MODE.
If the evaluation of sensor data evaluates to true, the corresponding bit in the result register (SCANRES) is set. By configuring SETIF in
CHx_INTERACT, interrupt flags can also be set on SCANRES events.
illustrates how the sensor data or ACMP sample is used for evaluation and interrupt generation.
Note:
For initialization purposes, SCANRES can be written by software. SCANRES should not be written while LESENSE is running (i.e., the
RUNNING bit in LESENSE_STATUS is high).
ACMP
sample
LESENSE
COUNTER
counter
ADC,
ADC data
ADCDIFF
CHx_INTERACT_SAMPLE
The results from sensor data evaluation can be fed into the decoder through the SENSORSTATE register. In DUALSAMPLE mode,
results from both the sampled ACMPs will be stored in both SCANRES and SENSORSTATE.
28.3.6.1 Threshold Comparison
In threshold comparison mode, the sensor data is compared to a threshold configured in CHx_EVAL_COMPTHRES. There are two
modes of threshold comparison: 'less than' and 'greater than or equal'. Threshold comparison mode is configured in CHx_EVAL_COMP.
silabs.com | Building a more connected world.
STEP_UP/
STEP_DOWN
Window state
>= COMPTHRES
GE
< COMPTHRES
LESS
CHx_EVAL_COMP
CHx_EVAL_MODE
Figure 28.7. Scan Result and Interrupt Generation
LESENSE - Low Energy Sensor Interface
Figure 28.7 Scan Result and Interrupt Generation on page 939
CHx_EVAL_SCANRESINV
ACMP
STEPDET
SLIDINGWIN
COUNTER,
ADC,
ADCDIFF
THRES
CHx_INTERACT_SAMPLE
Reference Manual
*In STEPDET mode, both step
direction and step/no step is stored
in SENSORSTATE
SCANRES[x]
NEGEDGE
POSEDGE
interrupt
LEVEL
SENSORSTATE*
0
NONE
CHx_INTERACT_SETIF
Rev. 1.1 | 939
Set
flag
Need help?
Do you have a question about the EFR32xG14 Wireless Gecko and is the answer not in the manual?
Questions and answers