I tried a simple program where I just generated a sine wave with AudioSynthWaveform and send it to AudioOutputSPDIF3. It works fine and I can receive the S/PDIF signal and see the sine wave just fine. However, then I added a delay(10) and a Serial.print('.') in a loop and I get a glitch on the sine wave every 10ms. It looks like 12 samples are from some other part of the waveform.
I am using PlatformIO and viewing my print output on the built-in terminal, but I also tried using TeraTerm to view the serial output with the same results. When there is no terminal output, the sine wave looks good and when there is terminal output, the sine wave has glitches.
I also tried using Serial1 instead of Serial so that it prints to a real serial port instead of the USB serial port. The sine wave looks fine in that case, so it just seems to be the USB serial port.
Has anyone else run into this problem?
I am using PlatformIO and viewing my print output on the built-in terminal, but I also tried using TeraTerm to view the serial output with the same results. When there is no terminal output, the sine wave looks good and when there is terminal output, the sine wave has glitches.
I also tried using Serial1 instead of Serial so that it prints to a real serial port instead of the USB serial port. The sine wave looks fine in that case, so it just seems to be the USB serial port.
Has anyone else run into this problem?