The STM32 family has a complex array of options available for operating timers. The STM32F103 has general-purpose timers TIM2, 3, 4, and 5 and then advanced timers TIM1 and TIM8. The general-purpose timers have plenty of features so you won’t need to reach for the advanced ones.
16. PWM with Timer 2
Get Beginning STM32: Developing with FreeRTOS, libopencm3, and GCC now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.