2018-03-01 06:00 AM
Hi
I'm using an STM32F051K6 microcontroller and I've written code to generate a PWM signal with a 2ms period and a variable (10% to 90%) duty cycle. The generated PWM signal is correct but I've noticed that, over a 7.8s period, the PWM output is only active for a percentage of the 7.8s period. This PWM active percentage corresponds to the Pulse-On percentage (duty cycle) of the actual PWM signal at 2ms. I've attached a copy of my code, the system clock configuration and a jpg file which shows the problem.
Thanks.