21.3 Functional Description
An overview of the LETIMER module is shown in
Figure 21.1 LETIMER Overview on page 715
. The LETIMER is a 16-bit down-coun-
ter with two compare registers, LETIMERn_COMP0 and LETIMERn_COMP1. The LETIMERn_COMP0 register can optionally act as a
top value for the counter. The repeat counter LETIMERn_REP0 allows the timer to count a specified number of times before it stops.
Both the LETIMERn_COMP0 and LETIMERn_REP0 registers can be double buffered by the LETIMERn_COMP1 and LETI-
MERn_REP1 registers to allow continuous operation. The timer can generate a single pin output, or two linked outputs.
Peripheral
bus
= 0
COMP1
(Top Buffer)
COMP0
(Top)
CNT (Counter)
REP0
(Repeat)
REP1
(Repeat Buffer)
=1
LETIMER Control
and Status
Reload
Update
Update
Stop
PRS event
LFACLK
LETIMERn
pin
ctrl
LETn_O0
Pulse
Control
Underflow
(UF interrupt flag)
REP0 Zero
(REP0 interrupt flag)
Buffer
Written
Repeat
load logic
pin
ctrl
LETn_O1
Pulse
Control
Top load
logic
=1
REP1 Zero
(REP1 interrupt flag)
=
=
COMP1 Match
(COMP1 interrupt flag)
COMP0 Match
(COMP0 interrupt flag)
PRS CH1
PRS CH0
PRS event
Clear
Start
SW
PRS event
Figure 21.1. LETIMER Overview
21.3.1 Timer
The timer is started by setting command bit START in LETIMERn_CMD, and stopped by setting the STOP command bit in the same
register. RUNNING in LETIMERn_STATUS is set as long as the timer is running. The timer can also be started on external signals,
such as a compare match from the Real Time Counter. If START and STOP are set at the same time, STOP has priority, and the timer
will be stopped.
The timer value can be read using the LETIMERn_CNT register. The value can be written, and it can also be cleared by setting the
CLEAR command bit in LETIMERn_CMD. If the CLEAR and START commands are issued at the same time, the timer will be cleared,
then start counting at the top value.
21.3.2 Compare Registers
The LETIMER has two compare match registers, LETIMERn_COMP0 and LETIMERn_COMP1. Each of these compare registers are
capable of generating an interrupt when the counter value LETIMERn_CNT becomes equal to their value. When LETIMERn_CNT be-
comes equal to the value of LETIMERn_COMP0, the interrupt flag COMP0 in LETIMERn_IF is set, and when LETIMERn_CNT be-
comes equal to the value of LETIMERn_COMP1, the interrupt flag COMP1 in LETIMERn_IF is set.
Reference Manual
LETIMER - Low Energy Timer
silabs.com
| Building a more connected world.
Rev. 1.1 | 715