VF50 PWM pin is not generating frequency less than 500Hz. But it is shown in the below link that we can generate frequency from 7.86Hz to 66MHz :- How to use PWM Library | Toradex Developer Center.
Can you please explain that why it is not able to generate PWM with 50 % duty cycle below 500 Hz?
Dear @Mania
It seems you have configured the baseFreq
parameter to 33 MHz.
The VF50 has the limitation that the achieveable range of output frequencies is ( baseFreq
/ 65536) to ( baseFreq
). For baseFreq
= 33MHz, this is 500Hz to 33MHz.
Regards, Andy
Dear @andy
I have configured the baseFreq parameter to 20 MHz and duty cycle parameter to 32768.
Dear @Mania
So simply calculate (20MHz / 65536) to get the minimum achievable PWM frequency.
Regards, Andy
Dear @andy
Thanks, Its 300Hz.
Can I change the baseFreq parameter according to desired minimum frequency in provided range?
Dear @Mania
Yes. Please refer to the .chm help file which comes as part of the library download package.
Regards, Andy
Dear @andy
Thank You so much. I got the exact frequency by varying the baseFreq.