cancel
Showing results for 
Search instead for 
Did you mean: 

Problems in setting the duty cycle and frequency

Yusuf Korkmaz
Associate II
Posted on January 09, 2018 at 08:25

Hello community,

i got a problem when i want to create on my stm8 eval board a pwm signal with 350khz and variable duty cycle from 0-100.

i calculate the the values for the registers as follows:

PWM Frequency = Clock of the Timer without Prescaler (16Mhz) / ARR +1 --> i choosed for arr 44 so i get apprx. 355kHz

But know i can not achieve the desired pwm resolution of 100, now i have 45 steps instead of 100.

Did you guys know how to solve this problem?

Thanks a lot

0 REPLIES 0