How to calculate the PWM frequency and duty cycle?

Post Reply
a_ziliu
Posts: 207
Joined: 20 Mar 2017, 10:52

27 Mar 2017, 13:53

The formula is as follows:
PWM frequency = PWM clock source frequency / ((Pre-scale + 1) * frequency divider * (CNR + 1))
Duty Cycle = (CMR + 1) / (CNR + 1)
(CNR: 16-bit counter register; CMR: 16-bit comparator register)

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest