EN / USD
1 Items
 Home
Blog
PWM with STM32
Overview, PWM signal generation through timer in STM32, STM32 configuration with STCube, Basic configuration, Timer 2 configuration, The initialization code, Dimming LED,
PWM stands for Pulse-Width Modulation. Once the switching frequency (fsw) has been chosen, the ratio between the switch-on time (TON) and the switch-off time (TOFF) is varied. This is commonly called duty-cycle (D). The duty cycle can be between 0 and 1 and is generally expressed as a percentage (%). D = TON / (TON + TOFF) = TON x fsw The variation of the pulse width, made at a high frequency (kHz), is perceived as continuous and can be translated into a variation of the rotation speed of a motor, dimming a LED, driving an encoder, driving power conversion, and etc. The use of PWM is also widely used in the automotive sector in electronic control units (ECU - Electronic Control Unit) to manage the energy to be supplied to some actuators, both fix ...