
DocID024597 Rev 5
RM0351
Low-power timer (LPTIM)
1169
34.4.6 Operating
mode
The LPTIM features two operating modes:
•
The Continuous mode: the timer is free running, the timer is started from a trigger event
and never stops until the timer is disabled
•
One shot mode: the timer is started from a trigger event and stops when reaching the
ARR value.
A new trigger event will re-start the timer. Any trigger event occurring after the counter starts
and before the counter reaches ARR will be discarded.
To enable the one shot counting, the SNGSTRT bit must be set.
In case an external trigger is selected, each external trigger event arriving after the
SNGSTRT bit is set, and after the counter register has stopped (contains zero value), will
start the counter for a new One-shot counting cycle as shown in
.
Figure 365. LPTIM output waveform, Single counting mode configuration
It should be noted that when the WAVE bit-field in the LPTIM_CFGR register is set, the Set-
once mode is activated. In this case, the counter is only started once following the first
trigger, and any subsequent trigger event is discarded as shown in
Figure 366. LPTIM output waveform, Single counting mode configuration
and Set-once mode activated (WAVE bit is set)
In case of software start (TRIGEN[1:0] = ‘00’), the SNGSTRT setting will start the counter for
one shot counting.
To enable the continuous counting, the CNTSTRT bit must be set.
06Y9
3:0
&RPSDUH
$55
([WHUQDOWULJJHUHYHQW
06Y9
3:0
&RPSDUH
$55
'LVFDUGHGWULJJHU
([WHUQDOWULJJHUHYHQW