settare un prescaler

Sto cercando di manipolare il timer5 della mega2560 al fine di impostare phase and frequency pwm sui pin 44 e 45 , ma io in realtà non so molto di registri e prescaler e quindi ho una domanda.
Vorrei impostare una frequenza di 10kHz su quei pin, è possibile modificare solo il valore OCR5A e ottenere 10kHz tenendo il system clock? O c'è un prescaler da impostare che mi aiuti a andare molto più vicino alla frequenza desiderata? Che cosa cambia(o meglio come si procede)?

//arduino mega2560 Timer5 
//here is my code where I generate 799,92Hz freq, PWM of 
//75% on OC5B and PWM of 75% on OC5C with clock system
//phase & freq correct PWM

int outputB = 45; //D45
int outputC = 44; //D44

void setup()
{
//outputs via timer5
 pinMode(outputB, OUTPUT);  // select Pin as ch-B
 pinMode(outputC, OUTPUT);  // select Pin as ch-C
 
 TCCR5A = B00101001; // Phase and frequency correct PWM change at OCR5A
 TCCR5B = B10001;  // System clock
 OCR5A = 10000; // 799,92Hz
 OCR5B = 7500; // 75%
 OCR5C = 7500; // 75%
 }

Mode: phase correct PWM
OCR5A as top
Prescaler: 1 (no prescaling)

OCR5A = 800;
OCR5B = 400;
OCR5C = 400;

Scrivo qui per non aprire un nuovo thread...

Ho letto sul datasheet '...per la scrittura a 16-bit, the high byte must be written before the low byte. For a 16-bit read, the low byte must be read before the high byte...'; per cui ho modificato la funzione che setta il pwm:

void setPWM(uint8_t pin, int dutyCycle) { 
  if(pin == leftPWM) {
    OCR5BH = (dutyCycle >> 8);  // OCR5B=dutyCycle;
    OCR5BL = (dutyCycle & 0xFF);
  } else if (pin == rightPWM) {
    OCR5CH = (dutyCycle >> 8); // OCR5C=dutyCycle;
    OCR5CL = (dutyCycle & 0xFF);    
  }
}

Che ne pensi?