28.3.16.3 LESENSE Decoder 1
The example below illustrates how the LESENSE module can be used for decoding using three sensors
0
1
2
3
7
6
5
4
001
000
011
001
010
011
110
111
111
101
101
100
010 110
000 100
x x
x
State Index
Sensor value
Figure 28.18. FSM Example 1
Figure 28.18 FSM Example 1 on page 950
, configure the following LESENSE registers:
1. Configure the channels to be used, be sure to set DECODE in CHx_EVAL.
2. Set PRSCNT to enable generation of count waveforms on PRS. Also configure a PCNT to listen to the PRS channels and count
accordingly.
3. Configure the following in STx_TCONFA and STx_TCONFB:
a. Set MASK = 0b1000 in STx_TCONFA and STx_TCONFB for all used states. This enables three sensors to be evaluated by
the decoder.
b. Configure the remaining bit fields in STx_TCONFA and STx_TCONFB as described in
Table 28.3 LESENSE Decoder Configu-
ration for FSM Example 1 on page 950
4. To initialize the decoder, run one scan, and read the present sensor status from SENSORSTATE. Then write the index of this state
to DECSTATE.
5. Write to START in CMD to start scanning of sensors and decoding.
Table 28.3. LESENSE Decoder Configuration for FSM Example 1
Register
TCONFA_
NEXTSTATE
TCONFA_COMP TCONFA_
PRSACT
TCONFB_
NEXTSTATE
TCONFB_COMP TCONFB_
PRSACT
ST0
1
0b001
UP
7
0b100
DOWN
ST1
2
0b011
UP
0
0b000
DOWN
ST2
3
0b010
UP
1
0b001
DOWN
ST3
4
0b110
UP
2
0b011
DOWN
ST4
5
0b111
UP
3
0b010
DOWN
ST5
6
0b101
UP
4
0b110
DOWN
ST6
7
0b100
UP
5
0b111
DOWN
ST7
0
0b000
UP
6
0b101
DOWN
Reference Manual
LESENSE - Low Energy Sensor Interface
silabs.com
| Building a more connected world.
Rev. 1.1 | 950