2025-06-05 9:34 PM
Hi,
I'm using an STM32C051K6T6 to read an audio file from FLASH (a book on tape, basically) and output the data over I2S to a codec/amplifier. I would like to understand the drawbacks, if any, of using the internally generated PLLI2SCLK instead of an external clock source (through the I2C_CKIN input) for the I2S clocks. I would prefer to use the PLLI2SCLK so that the pin for I2C_CKIN can be used as a GPIO instead, but I'm uncertain of the impact of doing so. For example, will the audio quality be significantly compromised by using PLLI2CLK instead of an external clock?
Thanks,
James
2025-06-05 10:27 PM
Well, let us start from theory
Clock will affect sound generating artifact by re-modulating any sound with frequency modulation.
Modulating tone (clock) can have near static frequency change (offset) or poor stability with phase noise or periodical changes(wander).
Artefact are critical for sound, less for voice.
But frequency drift (offset or wander) will change speech pitch.
At the end of the day, you have to look at the required quality, and the price tag attached to your device.
Unless you work for a top stylist - there sound quality is last requirement.
Look at max-min specs of the device, test a prototype with variable clock source changing between min and max and let your hear decide.
In my experience, a good clock is base requirements for good DAC performances, but I come form broadcasting, where hi fi is min requirement.
mike
2025-06-05 11:27 PM
Hi,
You can use the PLLI2SCLK for your player without any drawback, just verify that you can adjust the needed clock to come close to the desired playback frequency.
If the I2S clock gives you 1 or 2 % deviation from the desired frequency, nobody can hear this. So it's perfect for your player.
And what @mbarg.1 said, is just: if you need something with a reference standard or Hi-end audio - then need a separate precision oscillator for every target frequency. But really only for top reference quality needed.
I know, because I built all of them and I can promise you: using a crystal for the HSE and then PLL -> I2S clock, working fine.
Btw you can use as cheap I2S DAC without separate master clock PCM5102 .