1

Need formulae to calculate Prescaler,Counter Period and a Pulse value of each channel on a Timer with given values of

Input clock frequency (APB) Output Frequency (PWM) Duty cycle (for each channel)

TonyP
  • 5,655
  • 13
  • 60
  • 94

1 Answers1

2

Can you solve this equations?

Frequency = ClockFreq / ((PSC + 1) * (ARR + 1))

Dutyin% = (CCRx * 100) / ARR for the fast PWM

0___________
  • 60,014
  • 4
  • 34
  • 74
  • @PeterJ01, How do I determine suitable ARR and PSC values ? – TonyP May 24 '18 at 14:29
  • there is no one formula. If you know the `(PSC + 1) * (ARR + 1) ` you need to find the integer multiplication value which is as close as possible to the math one – 0___________ May 24 '18 at 14:31