I know this topic has been covered several times for the ATmega328 and others, but I haven't found a good thread on changing the PWM frequency of the ATmega32u4 to something other than 32kHz/3.9kHz etc by using the prescaler.
Changing frequency with prescaler:
http://forum.arduino.cc/index.php?topic=125306.0
From researching timer interrupts, I know there is a way to change the output compare register to basically anything you want, I just haven't found a good solution. My goal is to change the PWM frequency on pin 9 or 10 (timer1) to the 16kHz-20kHz range for a motor controller.
Is there a way to change the PWM frequency of the stock PWM timers, or would it be better to write a time interrupt to switch states?