Replies: 2 comments 8 replies
-
The I2S code here has a lot of different users and eyes on it, so I'm confident there's no inversion on the bit clock and the signals generated are good under normal conditions. That DAC's been EOL for many years per Cirrus Logic's website. I'm surprised anyone is still shipping it, but good on them for leaving the datasheet up. The Pico2 is spec'd for 150MHz operation and you're running it at 256MHz, a 1.7x overclock. So there's always the possibility that things like parts of the PIO or clock subsystem don't work stably at that range. Since this is one very specific set of hardware and not something others can duplicate, I would recommend simplifying things and a logic analyzer. If you have one, grab the I2S out pins and have You should also grab the MCLK with the logic analyzer and see if there's anything special needed in this chip for it. Most DACs I've seen don't really care about the phase relationship of MCLK and BCLK/LRCLK/DIN, so MCLK generation here is free-running and not sync'd to any other I2S signals. If this specific DAC needs MCLK and BCLK all aligned then you're going to need to write some add'l code to synchronize the 2 PIOS generating them. Your analog waveform looks like the DAC isn't lining up with the input digital bitstream and you're getting bits shifted from other samples into the current one (so you'll end up with sign-flipped data/etc.) 31.25khz is an odd output frequency, too. 32K is a common one and listed in the datasheet. I know some other DACs don't function properly at odd clocks (some hardcoded filters/etc.), maybe this one is like that. You could bump up to exactly 32K and see if there's any difference. |
Beta Was this translation helpful? Give feedback.
-
I tried 86a840f and a60ba2b. I did so rather extensively with I²S-out and not so extensively with I²S-in. It seems to work perfectly, now. I will do some more tests this weekend as I wanted to implement some audio-fx with it. So maybe I'll find something more on the input side, who knows. But for now everything seems to work very fine! Many thanks! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Version: 5.0.0
Board: genuine Pi Pico2 (without WiFi)
ADC/DAC-Board: Digilent Pmod I2S2 I²S Soundcard (Cirrus Logic chips)
I'm struggling with using a Digilent Pmod I²C module (for full duplex I/O) with a Pi Pico2. It seems like my SCLK is inverted?
I have no idea how this even can happen? Setup is like this:
An audio recording looks like this:

Am I doing something obviously wrong here?
All the best and many thanks,
Stefan
Beta Was this translation helpful? Give feedback.
All reactions