stm32 SoC Timers are widely applied in industrial fields because of their high frequency ultra-low-power consumption, high-precision. A use case shows how to configure a Timer as PWM signal by using low level code.
Please see the attached PDF.
Update: Timer 2 PWM example code (please see attached .rar file)
Video1: Variable Duty cycle PWM with STM32F407vg Discovery:
Video2: Variable Duty cycle PWM with STM32F746 Discovery: