AnsweredAssumed Answered

Problems in setting the duty cycle and frequency

Question asked by Yusuf Korkmaz on Jan 9, 2018

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