This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PCM5121: Output clipping and significant noise with I2S + external SCK

Part Number: PCM5121

Hi! We are designing a device prototype with PCM5121 connected to a microcontroller via SPI (control) and I2S (data). System clock is provided by the microcontroller via SCK pin. We tried different configurations and the DAC is clipping the output signal outside  around -300mV..300mV. We have measured it on both output pins - one is connected to an external isolated amplifier (next stage in our audio path) and another one is floating (unused in our device). Moreover, the output seems to be noisy (a few mV, though I'm not sure if my oscilloscope shows it precisely enough). For testing purposes our microcontroller sends sinus via I2S.

Do you have any idea why it happens? Voltages confirmed: DVDD = 3.3V, CPVDD = 3.3V, AVDD = 3.3V. My colleague tried to improve analog power supply stability but we can't see any correlation between noise in the power supply and noise/clipping of the output. XSMT is stable high.

We tried also not to write/read anything via SPI. We have only sent the samples through I2S. The effect was the same - output clipped below -300mV and above 300mV.

Below is an excerpt from the PCB schematic with PCM5121:

We use sampling 16kHz, sck=512*fs (8192kHz), bck=64fs. Our amplifier input is 200k impedance (pin 7 - OUTR - of PCM5121). We tried both in VCOM mode (schematic as above) and VREF mode (C67 changed into 0R resistor).

Do you have any ideas why this could happen?

Adam

  • Hi, Adam,

    Welcome to E2E, Thanks for your interest in our products!.

    Overall the schematic seems fine, so the issue could be related to the digital input signal or the configuration of the device. Do you have any output capture we can check to have a better understanding of the issue?. Also, do you have tried using a different I²S source as the input?, can you please share the configuration of the device?. 

    Best Regards,

      -Diego Meléndez López
       Audio Applications Engineer

  • Hi!

    Thanks for the response! When I was capturing the data for you, I saw it was my fault. The data on I2S was already clipped. I realized I have built into the software a kind of a limit that was enforced just before sending the data via I2S. Then I forgot to remove this limit for testing. Sorry!

    However, as I have written, I can see noise also. I thought that it's because our oscilloscope is too poor but now we have noticed that the noise frequency is correlated with sampling frequency of the data (number of samples per second on I2S). It looks like a saw function ("zigzag") added to the output with frequency exactly two times less than the sampling frequency. When we changed the sampling from 16kHz to 32kHz, the "noise" period became smaller two times. We thought that maybe we send the samples in wrong order (repeated or so). But it seems we don't.

    Currently we use the default settings for everything except for a few registers. Below is how we initialize the DAC:

    Page 0, Reg 2 := 0x10 (standby)

    Page 0, Reg 1 := 0x11 (reset)

    delay ~500ms

    Page 0, Reg 2 := 0x10 (standby)

    Page 0, Reg 4 := 0x00 (disable PLL)

    switch to VCOM mode:

    Page 1, Reg 8 := 0x01

    Page 1, Reg 9 := 0x00

    delay ~500ms

    Page 1, Reg 8 := 0x00

    Page 1, Reg 1 := 0x01

    Page 0, Reg 34 := 0x10 (interpolation 16x)

    Page 0, Reg 40 := 0x03 (32bit I2S)

    Page 0, Reg 3 := 0x00 (no muting)

    Page 0, Reg 42 := 0x11 (default audio path)

    Page 0, Reg 2 := 0x00 (powerup)

    Do you have any idea why we can see this "saw"? Or what you would recommend to check? Below is a screenshot from our oscilloscope that shows this "noise" with sampling 32kHz (on I2S). This was measured on the pin to which an amplifier is connected. But the second (floating) output pin looks quite similar.

    One of my colleagues said that it could be somehow produced by the interpolation filter. The next thing I'm about to check is to switch to other filters. But I really doubt the default filter would distort the data so much.

    Regards,

    Adam

  • HI, Adam,

    Thanks for the feedback. As you mention, the filter selected might not be causing the issue, but I would recommend you trying a different one to verify if the issue is improved. Also, I would recommend you to try with a different I²S source to discard any issue with the signal generated in the microcontroller. Have you measured the signal after the output filter?

    Best Regards,

      -Diego Meléndez López
       Audio Applications Engineer

  • Hello Diego!

    Today we found out that changing the interpolation mode (Page 0, Register 34) from 16x to 8x resolved the issue. Previously I have set 16x mode because I thought that "more is better" (or at least can't be worse). I can still see a large noise on the output (~10mV) but there is no "zigzag". For now I will assume that it's caused by my oscilloscope and we will focus on audible effects.

    The oscilloscope screenshot I have attached is what we could have seen after the filter (after R27 on the attached schematic).

    Trying with a different I2S source would be slightly problematic for now, that's why I wanted to avoid it. Nonetheless, if the effects are still not satisfactory, we will resort to this.

    Thanks for assistance.

    Regards,
    Adam