Skip to main content
Yusuf Korkmaz
Associate
January 9, 2018
Question

STM8 problems by setting duty cycle

  • January 9, 2018
  • 0 replies
  • 482 views
Posted on January 09, 2018 at 09:38

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

This topic has been closed for replies.