Functional overview
3.16
Timers and watchdogs
The ultra-low-power STM32L151xE and STM32L152xE devices include seven general-
purpose timers, two basic timers, and two watchdog timers.
Table 6
compares the features of the general-purpose and basic timers.
Counter
Timer
Counter type
resolution
TIM2,
TIM3,
16-bit
TIM4
TIM5
32-bit
TIM9
16-bit
TIM10,
16-bit
TIM11
TIM6,
16-bit
TIM7
3.16.1
General-purpose timers (TIM2, TIM3, TIM4, TIM5, TIM9, TIM10 and
TIM11)
There are seven synchronizable general-purpose timers embedded in the STM32L151xE
and STM32L152xE devices (see
TIM2, TIM3, TIM4, TIM5
TIM2, TIM3, TIM4 are based on 16-bit auto-reload up/down counter. TIM5 is based on a 32-
bit auto-reload up/down counter. They include a 16-bit prescaler. They feature four
independent channels each for input capture/output compare, PWM or one-pulse mode
output. This gives up to 16 input captures/output compares/PWMs on the largest packages.
TIM2, TIM3, TIM4, TIM5 general-purpose timers can work together or with the TIM10,
TIM11 and TIM9 general-purpose timers via the Timer Link feature for synchronization or
event chaining. Their counter can be frozen in debug mode. Any of the general-purpose
timers can be used to generate PWM outputs.
TIM2, TIM3, TIM4, TIM5 all have independent DMA request generation.
These timers are capable of handling quadrature (incremental) encoder signals and the
digital outputs from 1 to 3 hall-effect sensors.
TIM10, TIM11 and TIM9
TIM10 and TIM11 are based on a 16-bit auto-reload upcounter. TIM9 is based on a 16-bit
auto-reload up/down counter. They include a 16-bit prescaler. TIM10 and TIM11 feature one
independent channel, whereas TIM9 has two independent channels for input capture/output
compare, PWM or one-pulse mode output. They can be synchronized with the TIM2, TIM3,
TIM4, TIM5 full-featured general-purpose timers.
28/134
Table 6. Timer feature comparison
Prescaler factor
Up, down,
Any integer between
up/down
1 and 65536
Up, down,
Any integer between
up/down
1 and 65536
Up, down,
Any integer between
up/down
1 and 65536
Any integer between
Up
1 and 65536
Any integer between
Up
1 and 65536
DocID025433 Rev 8
DMA
request
generation
Yes
Yes
No
No
Yes
Table 6
for differences).
STM32L151xE STM32L152xE
Capture/compare
Complementary
channels
4
4
2
1
0
outputs
No
No
No
No
No
Need help?
Do you have a question about the STM32L151RE and is the answer not in the manual?