STM32 Pulse Width Modulation

From Stm32World Wiki
Jump to navigation Jump to search

STM32 MCUs comes in a truly baffling number of different configurations, but they all consist of one or more CPU cores, a number of buses and a number of peripherals. Some of these peripherals are timers. The number of available timers depend on the STM32 family. The low end devices might have as little as 4, while the higher end ones can have 16 or more.

What is Pulse Width Modulation (PWM)

When people talk about PWM they typically talk about a signal with a fixed frequency and the duty cycle being adjustable. In principle the duty cycle can be adjusted between 0 % (no pulses at all) to 100 % (always on).

10 percent duty cycle.jpg 90 percent duty cycle.jpg
10% duty cycle 90% duty cycle

In these two examples the first is showing a 1 kHz signal (1 ms) with a duty cycle of 10 %. The second show the same 1 kHz signal with a duty cycle of 90 %.

Miscellaneous Links