...the world's most energy friendly microcontrollers
2016-04-28 - Giant Gecko Family - d0053_Rev1.20
597
www.silabs.com
Multiple LETIMER cycles are required to write a value to the LETIMER registers. The
example in Figure 23.10 (p. 596) assumes that writes are done in advance so they arrive
in the LETIMER as described in the figure.
Figure 23.11 (p. 597) shows an example where the LETIMER is started while LETIMERn_CNT is
nonzero. In this case the length of the first repetition is given by the value in LETIMERn_CNT.
Figure 23.11. LETIMER LETIMERn_CNT Not Initialized to 0
CNT
TOP0
TOP1
REP0
REP1
3
2
4
3
3
3
2
3
3
3
2
2
3
3
2
1
3
3
2
0
3
3
2
2
2
3
2
1
2
3
2
0
2
3
2
2
1
3
2
1
1
3
2
0
1
3
3
3
3
3
3
2
3
3
3
1
3
3
3
0
3
3
3
3
2
3
3
2
2
3
3
1
2
3
3
0
2
3
3
3
1
3
3
2
1
3
3
1
1
3
3
0
Init ial configurat ion,
REP1 just writ t en
UFIF
REP0IF
UFIF
UFIF
UFIF
UFIF
UFIF
REP0IF
Int . flags set
St op,
final values
LFACLK
LETIMERn
LETn_O0
UFOA0 = 01
LETn_O1
UFOA0 = 10
3
3
3
3
3
3
3
3
u
3
u
3
u
3
u
3
u
3
u
3
u
3
3
3
3
u
3
u
3
u
1
3
u
3
u
3
3
0
0
3
u
23.3.6.3 PWM Output
Example 23.3. LETIMER PWM Output
There are several ways of generating PWM output with the LETIMER, but the most straight-forward way
is using the PWM output mode. This mode is enabled by setting UFOA0 or OFUA1 in LETIMERn_CTRL
to 3. In PWM mode, the output is set idle on timer underflow, and active on LETIMERn_COMP1 match,
so if for instance COMP0TOP = 1 and OPOL0 = 0 in LETIMERn_CTRL, LETIMERn_COMP0 determines
the PWM period, and LETIMERn_LETIMERn_COMP1 determines the active period.
The PWM period in PWM mode is LETIMERn 1. There is no special handling of the case
where LETIMERn_COMP1 > LETIMERn_COMP0, so if LETIMERn_COMP1 > LETIMERn_COMP0, the
PWM output is given by the idle output value. This means that for OPOLx = 0 in LETIMERn_CTRL, the
PWM output will always be 0 for at least one clock cycle, and for OPOLx = 1 LETIMERn_CTRL, the
PWM output will always be 1 for at least one clock cycle.
To generate a PWM signal using the full PWM range, invert OPOLx when LETIMERn_COMP1 is set
to a value larger than LETIMERn_COMP0.
23.3.6.4 Interrupts
Example 23.4. LETIMER PWM Output
The interrupts generated by the LETIMER are combined into one interrupt vector. If the interrupt for the
LETIMER is enabled, an interrupt will be made if one or more of the interrupt flags in LETIMERn_IF and
their corresponding bits in LETIMER_IEN are set.
Summary of Contents for Giant Gecko EFM32GG
Page 842: ......