User manual

...the world's most energy friendly microcontrollers
2012-04-24 - Giant Gecko Family - d0053_Rev0.96 587
www.energymicro.com
are LETIMERn_COMP0+1. 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 23.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
Initial configuration
UFIFUFIF 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 23.7 (p. 587) , 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 23.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
Initial configuration
UFIFUFIF 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
Stop
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 23.8 (p.
587) 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.
Figure 23.8. LETIMER Dual Output
LETn_O0
LETn_O1
UFOA0 = 10
UFOA1 = 10
REP0 = 2
REP1 = 7
START
REP0 = 3
START
REP0 = 2
REP1 = 3
START