problem with pwm_init function

hi to everyone,

i’m using pwm_init() function for setting frequence of a PWM signal created by a RCM3700

i wrote:

unsigned long freq;

freq = pwm_init(xxx);

If xxx is an unisgned long minus or equal to 5400 it’s all ok: RCM procudes a PWM signal with xxx frequence or (xxx)*4 if i used PWM_SPREAD in pwm_set()

If xxx is an unsigned long more of 5400 RCM produces a PWM signal with a frequence of 10,8 kHz or 43,2 kHZ if i used PWM_SPREAD in pwm_set()

Why can’t i produce a frequence between 5,4 kHz to 10 kHz??

thanks
Antonio

Try xxx of 1400 with PWM_SPREAD in pwm_set(). This should give you a signal of 5,6 kHz. Other values can be used with PWM_SPREAD set to allow you to get most any frequency between 5,4 kHz and 10 kHz.

my problem is that i want produce a frequence of 27 kHz but i can’t do it. Can you help me?