PWM Frequency

I am using an Uno to control a Buck/Boos controller.
I am using Pin 5 for the Buck controller and pin 3 for the Boost controller.
When the Buck controller is activated the PWM frequency is approximately 940 Hz. however, when the Boost controller is activated the PWM frequency is 30kHz.
Can someone shed light on why this is so?

How about filling us in with some details?

By default, Timer0 (PWM Pins 5 and 6 on an UNO) runs at 976.56 Hz
By default, Timer2 (PWM Pins 3 and 11 on an UNO) runs at 490.20 Hz.

If you are getting 32kHz PWM you must be mucking with the timer registers.

Thanks.
I found the Atmega328P manual and found the timer registers. I have been mucking around with these registers without knowing what I'm doing.

  1. Can I do bit manipulations with these registers? Can I read/write specific bits there or must I use byte and/or manipulations?
    2.What will be the syntax to use in he arduino IDE accessing these registers?
    3.Can I access these registers by using there Atmega register names?

Thanks again

  1. Yes. Yes.
  2. Standard C/C++ syntax.
  3. Yes.

Thanks.
I read some of these TCCR registers and it looks to me as though they come preset to certain values. If I change them will they be changed without my knowledge? I doubt that. Where does the preset values come from?

If I change them will they be changed without my knowledge?

Yes. They are initialized to various values by internal Arduino functions on startup, and possibly at other times, depending on what libraries/functions you have included in your code.