STM32 Timers: Clock, Modes, and Configuration
Almost every STM32 project needs to deal with time at some point. A program has to run a task at a fixed interval, dim an LED, drive a motor, measure the length of a pulse, or read the position of a rotary encoder. Hardware timers handle all of these jobs without keeping the CPU busy, and this makes them one of the most useful peripherals of the STM32 family.
This section collects the STM32 timer tutorials in one place. If you are new to timers, begin with the STM32 Timers Complete Guide, which explains the timer types, the clock, the prescaler, the counter and the auto-reload register. The articles after it cover timer interrupts, PWM generation, input capture, output compare, one-pulse mode, encoder mode, advanced-control timers, and timer synchronization with ADC triggers. Every article includes a CubeMX configuration and a working example for the NUCLEO-F446RE board using the HAL library.
The tutorials work best when they are read in order, but each one can also be read on its own. Some examples use GPIO pins and interrupts, so the STM32 GPIO tutorials are a good place to start if those topics are still new to you.