Arduino WiFi Rev2 1000Hz Frequency

I have a functioning code for the Arduino Uno that sets the fundamental frequency of the chip to 1kHz:

TCCR2A = _BV(COM2A0) | _BV(COM2B1) | _BV(WGM21) | _BV(WGM20);
TCCR2B = _BV(WGM22) | _BV(CS22);
OCR2A = 249;
OCR2B = 249;

After reading a lot of forum posts and the Arduino Uno's WiFi Rev2 datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/megaAVR0-series-Family-Data-Sheet-DS40002015B.pdf I have not been able to figure out how I can get a fundamental frequency of 1kHz on the Arduino Uno WiFi Rev2 board.

Has anyone had any luck with doing something similar to this board? Thank you!

1 Like