...the world's most energy friendly microcontrollers
2014-07-02 - Gecko Family - d0001_Rev1.30
327
www.silabs.com
Some simple waveforms generated with the different output modes are shown in Figure 21.6 (p.
327) . For the example, REPMODE in LETIMERn_CTRL has been cleared, COMP0TOP also in
LETIMERn_CTRL has been set and LETIMERn_COMP0 has been written to 3. As seen in the figure,
LETIMERn_COMP0 now decides the length of the signal periods. For the toggle mode, the period of the
output signal is 2(LETIMERn 1), and for the pulse modes, the periods of the output signals
are LETIMER1. Note that the pulse outputs are delayed by one period relative to the toggle
output. The pulses come at the end of their periods.
Figure 21.6. LETIMER Simple Waveforms Output
CNT
COMP0
3
3
3
2
3
1
3
0
3
3
3
2
3
1
3
0
3
3
3
2
3
1
3
0
3
3
3
2
3
1
3
0
3
3
3
2
3
1
3
0
3
3
3
2
3
1
Init ial configurat ion
UFIF
UFIF
UFIF
UFIF
UFIF
Int . flags set
LFACLK
LETIMERn
LETn_O0
UFOA0 = 01
LETn_O0
UFOA0 = 10
LETn_O0
UFOA0 = 00
3
0
UFIF
3
0
For the example in Figure 21.7 (p. 327) , the One-shot repeat mode has been selected, and
LETIMERn_REP0 has been written to 3. The resulting behavior is pretty similar to that shown in
Figure 6, but in this case, the timer stops after counting to zero LETIMERn_REP0 times. By using
LETIMERn_REP0 the user has full control of the number of pulses/toggles generated on the output.
Figure 21.7. LETIMER Repeated Counting
CNT
COMP0
3
3
3
2
3
1
3
0
3
3
3
2
3
1
3
0
3
3
3
2
3
1
3
0
Init ial configurat ion
UFIF
UFIF
UFIF
Int . flags set
LFACLK
LETIMERn
LETn_O0
UFOA0 = 01
LETn_O0
UFOA0 = 10
LETn_O0
UFOA0 = 00
REP0
3
3
3
3
2
2
2
2
1
1
1
1
St op
REP0IF
3
0
0
3
0
0
3
0
0
3
0
0
3
0
0
3
0
0
3
0
0
3
0
0
3
0
0
3
0
0
3
0
0
3
0
0
3
0
3
Using the Double repeat mode, output can be generated on both the LETIMER outputs. Figure 21.8 (p.
328) shows an example of this. UFOA0 and UFOA1 in LETIMERn_CTRL are configured for pulse
output and the outputs are configured for low idle polarity. As seen in the figure, the number written to
the repeat registers determine the number of pulses generated on each of the outputs.
Summary of Contents for EFM32G
Page 505: ......