21.3.3.5 Buffered Mode
The Buffered repeat mode allows buffered timer operation. When started, the timer runs LETIMERn_REP0 number of times. If LETI-
MERn_REP1 has been written since the last time it was used and it is nonzero, LETIMERn_REP1 is then loaded into LETI-
MERn_REP0, and counting continues the new number of times. The timer keeps going as long as LETIMERn_REP1 is updated with a
nonzero value before LETIMERn_REP0 is finished counting down. The timer top value (LETIMERn_COMP0) may also optionally be
buffered by setting BUFTOP in LETIMERn_CTRL.
If the timer is started when both LETIMERn_CNT and LETIMERn_REP0 are zero but LETIMERn_REP1 is non-zero, LETIMERn_REP1
is loaded into LETIMERn_REP0, and the counter counts the loaded number of times.
Used in conjunction with a buffered top value, both the top and repeat values of the timer may be buffered, and the timer can for in-
stance be set to run 4 times with period 7 (top value 6), 6 times with period 200, then 3 times with period 50.
A state machine for the buffered repeat mode is shown in
REP1
shown in the state machine is an internal variable that keeps track of whether the value in LETIMERn_REP1 has been loa-
USED
ded into LETIMERn_REP0 or not. The purpose of this is that a value written to LETIMERn_REP1 should only be counted once.
REP1
is cleared whenever LETIMERn_REP1 is written.
USED
CNT = CNT - 1
CNT = TOP*
CNT = TOP**
If (BUFTOP)
COMP0 = COMP1
REP0 = REP1
REP1
= 1
USED
silabs.com | Building a more connected world.
Figure 21.4 LETIMER Buffered Repeat State Machine on page
NO
NO
START
YES
NO
CNT == 0
YES
NO
REP0 == 0
YES
NO
REP1 == 0
!REP1
YES
TOP*
If (COMP0TOP)
TOP* = COMP0
Else
TOP* = 0xFFFF
Figure 21.4. LETIMER Buffered Repeat State Machine
Wait for positive clock edge
RUNNING
YES
CNT == 0
NO
CNT = CNT - 1
YES
CNT = TOP*
REP0 < 2
NO
If (!START)
YES
CNT = TOP**
If (BUFTOP)
and !REP1 != 0
YES
USED
REP0 = REP1
REP1
NO
STOP = 1
REP0 = 0
TOP**
If (!COMP0TOP)
TOP** = 0xFFFF
Else if (BUFTOP)
TOP** = COMP1
Else
TOP** = COMP0
Reference Manual
LETIMER - Low Energy Timer
If (STOP)
RUNNING = 0
Else if (START)
RUNNING = 1
End if
START = 0
STOP = 0
REP0 = REP0 - 1
COMP0 = COMP1
= 1
USED
Rev. 1.1 | 719
719.
Need help?
Do you have a question about the EFR32xG14 Wireless Gecko and is the answer not in the manual?