English
Language : 

EFM32WG Datasheet, PDF (588/834 Pages) List of Unclassifed Manufacturers – The EFM32WG Wonder Gecko is the ideal choice for demanding 8-, 16-, and 32-bit energy sensitive applications.
23.3.5 Examples
...the world's most energy friendly microcontrollers
This section presents a couple of usage examples for the LETIMER.
23.3.5.1 Triggered Output Generation
Example 23.1. LETIMER Triggered Output Generation
If both LETIMERn_CNT and LETIMERn_REP0 are 0 in buffered mode, and COMP0TOP and BUFTOP
in LETIMERn_CTRL are set, the values of LETIMERn_COMP1 and LETIMERn_REP1 are loaded into
LETIMERn_CNT and LETIMERn_REP0 respectively when the timer is started. If no additional writes to
LETIMERn_REP1 are done before the timer stops, LETIMERn_REP1 determines the number of pulses/
toggles generated on the output, and LETIMERn_COMP1 determines the period lengths.
As the RTC can be used to start the LETIMER, the RTC and LETIMER can thus be combined to generate
specific pulse-trains at given intervals. Software can update LETIMERn_COMP1 and LETIMERn_REP1
to change the number of pulses and pulse-period in each train, but if changes are not required, software
does not have to update the registers between each pulse train.
For the example in Figure 23.9 (p. 588) , the initial values cause the LETIMER to generate two pulses
with 3 cycle periods, or a single pulse 3 cycles wide every time the LETIMER is started. After the output
has been generated, the LETIMER stops, and is ready to be triggered again.
Figure 23.9. LETIMER Triggered Operation
Initial configuration,
REP1 just writ t en
St op
Write
START= 1
Write
START= 1
St op
TOP1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
TOP0 X 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
CNT 0 2 1 0 2 1 0 0 0 0 0 0 2 1 0 2 1 0 0 0 0 2 1 0
REP0 0 2 2 2 1 1 1 0 0 0 0 0 2 2 2 1 1 1 0 0 0 2 2 2
REP1 2 2u 2u 2u 2u 2u 2u 2u 2u 2u 2u 2u 2u 2u 2u 2u 2u 2u 2u 2u 2u 2u 2u 2u
Int. flags set
LFACLKLETIMERn
LETn _O0
UFOA0 = 01
LETn _O1
UFOA0 = 10
UFIF
UFIF
REP0 IF
UFIF
UFIF
REP0 IF
UFIF
2013-05-08 - Wonder Gecko Family - d0233_Rev0.50
588
www.energymicro.com