English
Language : 

EFM32WG Datasheet, PDF (618/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
the channel configuration registers, CHx_TIMING, CHx_INTERACT, and CHx_EVAL, throughout this
chapter.
By default, the channel configuration registers are directly mapped to the channel number. Configuring
SCANCONF in CTRL makes it possible to alter this mapping.
Configuring SCANCONF to INVMAP will make channels 0-7 use the channel configuration registers
for channels 8-15, and vice versa. This feature allows an application to quickly and easily switch
configuration set for the channels.
Setting SCANCONF to TOGGLE will make channel x alternate between using CHX_CONF and CHX
+8_CONF. The configuration used is decided by the state of the corresponding bit in SCANRES. For
instance, if channel 3 is performing a scan and bit 3 in SCANRES is set, CH11_CONF will be used.
Channels 8 through 15 will toggle between CHX_CONF and CHX-8_CONF. This mode provides an easy
way for implementation of hysteresis on channel events as threshold values can be changed depending
on sensor status.
Setting SCANCONF to DECDEF will make the state of the decoder define which scan configuration
to be used. If the decoder state is at index 8 or higher, channel x will use CHX+8_CONF, otherwise it
will use CHX configuration. Similarly, channels 8 through 15 will use CHX configuration when decoder
state index is less than 8 and CHX-8_CONF when decoder state index is higher than 7. Allowing
the decoder state to define which configuration to use, enables easy implementation of for instance
hysteresis, as different threshold values can be used for the same channel, depending on the state of
the application. Table 25.1 (p. 618) summarizes how channel configuration is selected for different
setting of SCANCONF.
Table 25.1. LESENSE scan configuration selection
LESENSE
channel x
DIRMAP
INVMAP
SCANCONF
TOGGLE
DECDEF
SCANRES[n] = 0 SCANRES[n] = 1 DECSTATE < 8 DECSTATE >= 8
0 <= x < 8 CHx_CONF CHx
+8_CONF
CHx_CONF
CHx+8_CONF
CHx_CONF
CHx+8_CONF
8 <= x < 16 CHx_CONF CHx-8_CONF CHx_CONF
CHx-8_CONF
CHx_CONF
CHx-8_CONF
Channels are enabled in the CHEN register, where bit x enables channel x. During a scan, all enabled
channels are measured, starting with the lowest indexed channel. Figure 25.2 (p. 619) illustrates a
scan sequence with channels 3, 5, and 9 enabled.
25.3.2 Scan sequence
LESENSE runs on LFACLKLESENSE, which is a prescaled version of LFACLK. The prescaling factor for
LFACLKLESENSE is selected in the CMU, available prescaling factors are:
• DIV1: LFACLKLESENSE = LFACLK/1
• DIV2: LFACLKLESENSE = LFACLK/2
• DIV4: LFACLKLESENSE = LFACLK/4
• DIV8: LFACLKLESENSE = LFACLK/8
Note
LFACLKLESENSE should not exceed 50kHz.
All enabled channels are scanned each scan period. How a new scan is started is configured in the
SCANMODE bit field in CTRL. If set to PERIODIC, the scan frequency is generated using a counter which
2013-05-08 - Wonder Gecko Family - d0233_Rev0.50
618
www.energymicro.com