Datasheet

Functional overview STM32L010F4/K4
24/91 DS12323 Rev 2
3.13 Timers and watchdogs
The ultra-low-power STM32L010F4/K4 include two general-purpose timers, one low- power
timer (LPTIM1), two watchdog timers and the SysTick timer.
3.13.1 General-purpose timers (TIM2, TIM21)
Table 5 compares the features of the general-purpose timers.
TIM2
This timer is based on 16-bit auto-reload up/down counter. It includes a 16-bit prescaler and
four independent channels for input capture/output compare, PWM or one-pulse mode
output.
TIM2 can work together and be synchronized with the TIM21 timer via the Timer Link
feature for synchronization or event chaining. The TIM2 counter can be frozen in debug
mode. Any of the general-purpose timers can be used to generate PWM outputs.
TIM2 has independent DMA request generation.
This timer is capable of handling quadrature (incremental) encoder signals and the digital
outputs from 1 to 3 hall-effect sensors.
TIM21
This timer is based on a 16-bit auto-reload up/down counter. It includes a 16-bit prescaler
and two independent channels for input capture/output compare, PWM or one-pulse mode
output. TIM21 can work together and be synchronized with TIM2.
TIM21 can also be used as a simple timebase and be clocked by the LSE (32.768 kHz) to
provide independent timebase from the main CPU clock.
Table 5. Features of general purpose timers
Timer
Counter
resolution
Counter
type
Prescaler factor
DMA
request
generation
Capture/compare
channels
Complementary
outputs
TIM2 16-bit
Up,
down,
up/down
Any integer
between 1 and 65536
Yes 4 No
TIM21 16-bit
Up,
down,
up/down
Any integer
between 1 and 65536
No 2 No
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.