© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024
W. GayBeginning STM32Maker Innovations Serieshttps://doi.org/10.1007/979-8-8688-0199-0_16

16. PWM with Timer 2

Warren Gay1  
(1)
St. Catharines, ON, Canada
 

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.

This chapter will demonstrate one of the frequently sought-after applications of a timerthat of driving a PWM (Pulse Width Modulated) servo motor. Figure 16-1 illustrates one example of a typical servo motor, which was pulled out ...

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.