Outputting PWM frequency 200kHz

Is it possible to generate a PWM signal of 200kHz using the Arduino Nano? I have found examples of generating around ~65kHz by changing the settings of Timer0 using the line:

TCCR0B = TCCR0B & 0b11111000 | 0x01;

It seems this is the maximum value that the timer can be set to. Is this just an unavoidable limit of the hardware?

Yes, although as timer 0 is also used to generate the time reported by the millis() function, using timer 0 for this will prevent millis() working. You might wish to use timer 2 instead. Configure the timer in fast PWM mode, set the prescaler to 1 and set TOP to (16MHz/200kHz - 1) = 79. You will have 80 steps of PWM (0 to 79) instead of the usual 256.

I have the same issue in generating PWM above 200kHz from timer1. I understand your logic Mr.dc42

set the prescaler to 1 and set TOP to (16MHz/200kHz - 1) = 79. You will have 80 steps of PWM (0 to 79) instead of the usual 256.

But could you please help me bit further by sending me with the arduino code for all this??