Getting 3.072MHz clock out of Arduino Due / Arduino M0 pro

Hello,
I need to get 3.072MHz clock on an output pin, for audio purposes.
I have Arduino Due and Arduino M0 pro.

This rate is common with I2S, but none of the boards support I2S library (as far as I could tell from googling).

I tried the following code on Arduino Due, but it doesn't give me the exact frequency:

void setup() {
int32_t freq = 3072000;
int32_t mask_PWM_pin = digitalPinToBitMask(6);
REG_PMC_PCER1 = 1<<4;
REG_PIOC_PDR |= mask_PWM_pin;
REG_PIOC_ABSR |= mask_PWM_pin;
REG_PWM_CLK = 0;
REG_PWM_CMR7 = 0<<9;
REG_PWM_CPRD7 = 84000000/freq;
REG_PWM_CDTY7 = 42000000/freq;
REG_PWM_ENA = 1<<7;
}

void loop() {
}

Could you please assist me with this?
Thanks!

P.S. as a fallback, if you can tell me what board can do it for sure, and with what code, it would be much appreciated.
Thanks!

I2S library for the DUE:

BTW 48 KHz can be easily achieved (because 84MHz/ 48 KHz is an integer), if you have 4 channels and 16_bit samples, that is 3.072 MHz.

ard_newbie:
I2S library for the DUE:
GitHub - delsauce/ArduinoDueHiFi: An I2S audio codec driver library for the Arduino Due board.

BTW 48 KHz can be easily achieved (because 84MHz/ 48 KHz is an integer), if you have 4 channels and 16_bit samples, that is 3.072 MHz.

But that's irrelevant, I2S devices need a rock solid jitter free bitclock. 84MHz is not a multiple of 3.072

The way to drive I2S is use a 6.144 or 12.288MHz crystal as the system clock. Or an external clock
synthesizer to drive things.

At a pinch 80MHz / 26 = 3.077MHz