Difference between revisions of "STM32 Pulse Width Modulation"

From Stm32World Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
[[Category:STM32]][[Category:STM32 Development]][[Category:STM32 HAL]][[Category:C]]{{metadesc|STM32 Pulse Width Modulation}}
 
[[Category:STM32]][[Category:STM32 Development]][[Category:STM32 HAL]][[Category:C]]{{metadesc|STM32 Pulse Width Modulation}}
[[STM32]] [[MCU]]s 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.
+
[[STM32]] [[MCU]]s 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 [[STM32 Timers|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) ==
 
== What is Pulse Width Modulation (PWM) ==

Revision as of 04:17, 12 September 2021

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 %.