Hello Ladies and Gentlemen,
I need to use a precision PWM output of 500khz from one of the pwms.
I was checking with the existing pwms exposed at userspace /sys/devices/32xxxpwm/
I set the period to 2000 ns and dutycycle to 1000ns which i expect PWM at 500k.
But the output is 533.3khz.
The small details in the datasheet also gives this formula :
Required frequency = (408M / 256) / (1 + PFM_0) = 150 kHz / (1 + PFM_0)
500 = 1600/(1+PFM_0)
PFM = (1600 / 500 ) - 1
PFM = 2
reusing the formula
freq = 1600/(1 + 2) = 533.3khz
Please dont tell me that such a powerful soc cannot precisely generate 500khz
Can anyone help me set the precise 500k pwm output?