English
Language : 

EFM32WG Datasheet, PDF (629/834 Pages) List of Unclassifed Manufacturers – The EFM32WG Wonder Gecko is the ideal choice for demanding 8-, 16-, and 32-bit energy sensitive applications.
...the world's most energy friendly microcontrollers
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 25.3 (p. 629) .
Table 25.3. LESENSE decoder configuration
Register TCONFA_NEXTSTTCAOTNEFA_COMP TCONFA_PRSACT TCONFB_NEXTSTTCAOTNEFB_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
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.
25.3.14.4 LESENSE decoder 2
The example below illustrates how the LESENSE decoder can be used to implement the state machine
seen in Figure 25.14 (p. 629) .
Figure 25.14. FSM example 2
1XXX
1XXX
8
0
0010
0001
0000
0000
1XXX
6
2
0011
0010
4
0011
0001
1XXX
Sensor value
St at e Index
1. Configure STx_TCONFA and STx_TCONFB as described in Table 25.4 (p. 630) .
2013-05-08 - Wonder Gecko Family - d0233_Rev0.50
629
www.energymicro.com