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
Warren Gay1
(1)
St. Catharines, Ontario, Canada
This chapter will demonstrate one of the frequently sought-after applications of a timer—that of driving a PWM (Pulse Width Modulated) servo motor. Figure 16-1 illustrates one example of a typical servo motor, which was pulled out of service.
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.