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.

PCM5122: Big spark generated very rare and ramdomly by the PCM5122 also with costant 0 signal in the PCM_din.

Part Number: PCM5122
Other Parts Discussed in Thread: PCM1808, PCM1792

Tool/software:

Dear TI forum,

I've this big issue using the PCM5122  a Raspberry CM4 CPU with Circle software:

This is the scehmatics of ADC DAC part of the system:

/resized-image/__size/320x240/__key/communityserver-discussions-components-files/6/PCM5122-sch-diag.jpg 

In this application there is a clock generator signal PCM_CLK_GPIO18 of 22.5792MHz going to the ADC PCM1808 as a clock reference.

The PCM1808 is a master for generating the LRCK and BCK. The ADC is working at 88.2 KHz.

These signal are master for CM4 CPU and two PCM5122 DAC.

The CM$ generate the PCM_dout for the DAC.

The LRCK is divided by two with a logic to generate two stereo signal with the two PCM5122. 

To divide the LRCK by two the PCM_dout from CM$ as a 1 in a LRCK transition to generate the LRCK at 44100Hz for DAC. 

So the CM5122 works at 44.1kHz.

The two PCM5122 are configured as slave, the BCK is the reference for the internal PLL, interface selected I2S, word 24, the diveder are setting correctly et..

The system start ok, the audio signal is generated correctly, but very ramdomly the PCM5122 generate a big spark, also without any digital signal, also with the Dout is costantly 0.

It seem to be related to the noise of power supply, or the noise on the I2S signal, I see reducng this noise, and cleaning these signal, the probability to generate this big spark is reduce, but I never obtain a complete reduction, some time also after many hours of silent, with Dout=0, a big spark is generated.

 If needed I can share more detail on the application,

Could you suggest any solution for this?

Thanks 

Francesco

  • Hello Francesco,

    I can not see the details of the schematic due to its low resolution, would you please send the schematics in high resolution so it is readable.

    Also can you elaborate on the spark, is it a load sound  (pop noise) or a real spark with a load sound. I assume a real spark  would damage the IC, so most probably it is just a loud pop noise, not a spark.

    Since you mention the dividers are set correctly I assume you are using the DAC  in I2C configuration,  if so,   Dout doesn't exist in I2C configuration, it exists only in Hardware control (pin 16) . So do you mean  when there is no Dout at the  ADC , you still hear the pop noise ?

    Few things to confirm or provide:

    • Pull ADC input to ground so there is no code being send to the DAC and verify the issue persists.
    • Disconnect the DAC from ADC's output  and feed the DAC with no input, this helps to confirm the cause might be due to  the supplies as you suspected.
    • We need to have the scope plots for supplies, as well as all I2S signals going into the DAC. Pop noise usually is the result of clk halt/error as well as at power up and power down- when a capacitor at the output charges or discharges abruptly. it is important to capture the behavior of supply and I2S at the moment there is an issue so we can find the cause and possibly the root cause.

    I put couple of links that you can refer to and might find it useful.

    https://e2e.ti.com/support/switches-multiplexers-group/switches-multiplexers/f/switches-multiplexers-forum/1114638/faq-how-can-i-reduce-the-click-and-pop-noise-on-my-audio-switch-and-detection-jack

    https://docs.kernel.org/sound/soc/pops-clicks.html

    Regards,

    Arash

  • Dear Arash,

     

    thanks a lot for your prompt answer to my question, and sorry for my poor description of the application, now I give you all the detailed information about the design, file attached:

    • “Digital audio” system description.
    • Complete schematics diagram of the Raspberry CPU interface, see page #2 about the schematic of digital audio.
    • Digital recording of the I2S signal from CM4 to the two DAC, from Logic Analyser, exactly when the pulse issue happened 2024-06-03_13-56-59.kvdat. Download the software to read the data from this site:

    https://www.qdkingst.com/en/download

    • Conversion of digital I2S signal in numerical data, file excel, from LA when spark issue happened, 2024-06-03_13-56-59.xlsx.
    • Code example of the two PCM5122 configuration, PCM5122 code.cpp.

    Download from here the file:

    https://sendgb.com/TulGgnWCwZQ

     

    The issue description:

    Randomly, a big pulse is generated in the analog output of the DAC, randomly left or right channel, also the intensity of the pulse could be of different level.

    In the loudspeaker seem like a shot or spark, is not an electrical spark, but the DAC continuing to work regularly, the sound is very good, it not seem to be damaged.

    Only one DAC present this issue, is the U6 in the schematics, LRCK#1. In some way is related the forced bit data to generate LR_CK divided by two.

    This pulse is not in the digital data of the I2S as showed by the excel file derived from the LA data, samples in the moment of the pulse.

    I see the probability to have this random pulse is in some way proportional the noise in the board.

    Reducing the noise of keyboard scanning reducing the pul_up resistors, fixing some floating input, or converting it to fixed output signal and other similar action has reduce a lot the probability to have the random pulse in the output.

    Now the probability is one pulse in some hours.

    In the DAC configuration automute is disabled, and also any other I2S signal error action are disabled.

    I have also set the three pins GPIO3/4/5 from free input to fixed output.

    Could be a solution changing the DAC Architecture with register 79hex from Hyper-Advanced to Classical?

    Is more than a month I’m working on this issue without find the final solution.

    Cloud you help me? Please this is a very urgent

     

    Thank a lot.

     Francesco

  • Hello Francesco,

    We can not download any software or anything that is not approved by out IT team, so I can only review jpeg/pdf and similar formats, everything else will be blocked.

    As I mentioned before, One of the common sources of  the pop noise is interruption or error in the I2S signals, it seems you also notice it is related the LRCK going to one of the DACs. Also since this happens once in a while and randomly, the only solution is to provide solid clks to both DACs and there is not much you can do  if the source of  the problem is the clks going to the DAC.

    As a sanity check you can swap the 2 clks going to these DACs to see if random pop shifts to the other DAC. This is to confirm the source of the problem is one of the clk lines. Another suggestion is to try tabbing both ICs from the  LRCLK that seems has no glitch or noise ,this might work but I am not confident this would  a solid solution

    I am sorry that I can not be of any more help as the issue is not with the DAC itself .

    Regards,

    Arash

  • Dear Arash,

    the acquisition of I2S signal from the logic analyzer shown there are no interruption or discontinuity on these signal.

    If you can't download the app to read the I2S signal please download some images of these here:

    https://drive.google.com/file/d/1lXmJegfKpwzq3Xs7sAutIuBHZ0ZU4O1g/view?usp=sharing

    https://drive.google.com/file/d/1lWFBfc500KVBrRUUFIUE5SfS427DAVAB/view?usp=sharing

    https://drive.google.com/file/d/1lX-zVvK_VOxyKJWYe1qnkXkQk3IzCtik/view?usp=sharing

    In all the test and improvement obtained the pop noise seem to be related to an high sensitivity of the DAC to the noise on the board or signal integrity.

    Could you please have a look the schematic diagram and indicate me how to iporve integrity of the I2S signal with filter?

    Download the schematics from this link:

     https://drive.google.com/file/d/1S5V-VSjqDMhaFVoHcVBUYvI5pDRks5xu/view?usp=drive_link 

    The exchange of LRCK between DACs is a good test to do, I'll do it.

    Could you better explain the tabbing from LRCK, this is not clear to me,

    thanks a lot

  • Hello Francesco,

    I can not open file sharing locations for security reasons as well. Probably it is not needed for me to look at the clks since I wanted to see the I2S signals right at the moment that there is a pop noise but again, since pop noise cause is well known in DACs, most probably you should be able to see an issue with the clks ( integrity or noise level) at that random moment. I don't think there is anything that you can do with the DAC itself rather you have to work on the signals getting into it. 

    Exchanging of LRCLK b/w the 2 DAC was one suggestion and another suggestion was instead of swapping the DACs, send the same clk line that is working for a given DAC to the other DAC as well. may be add a buffer and tab both DACs from same clk line. Since it happens very randomly and not very often, it might be hard to find the source in your clk tree.

    Regards,

    Arash

  • Dear Arash,

    I'll try with this suggestion to better understand the origin of the issue.

    As for your experience, to reduce the probability of this pop noise is better to use external SCK as a master or use internal PLL to generate internal SCK from BCK as reference?

    In the I2S interface the DIN data out of the 24bit word could be a source of the pop noise if this bits is randomly 0-1?

    To reduce the probability of pop noise is better to disable any action on error on BCK, LRCK, SCK?

    Disable auto-mute is better to reduce pop noise?

    I'm using this sequence for setting the PCM5122 registers, with this code, could you verify if the sequence is correct?


            { 0x29, 0x01 }, // 1 clock bit Delay.
            { 0x79, 0x01 },   //Mode2 - Classic PCM1792 advanced current-segment architecture.

            { 0x25, 0x1A }, //disable autoconfig-ignore SCK
            { 0x14, 0x00 }, //P=1
            { 0x15, 0x10 }, //J=16
            { 0x16, 0x00 }, //D1=0
            { 0x17, 0x00 }, //D2=0
            { 0x18, 0x00 }, //R=1
            { 0x1B, 0x01 }, //Divider MAC
            { 0x1C, 0x0F }, //Divider DAC clk
            { 0x1D, 0x03 }, //NCP divider
            { 0x1E, 0x00 }, //OSC divider
            { 0x22, 0x00 }, //FS setting
            { 0x23, 0x04 }, //IDAC1  sets to 1024
            { 0x24, 0x00 }, //IDAC2  
            { 0x0D, 0x10 }, //Set PLL Clock Source to be BCK instead of SCK

            // Disable auto mute
            { 0x41, 0x00 },

            //set to outut GPIO pin
            { 0x08, 0x3C }, //Out direction for GPIO3 GPIO4 GPIO5 GPIO6
            { 0x52, 0x02 }, //Out direction for GPIO3
            { 0x53, 0x02 }, //Out direction for GPIO4
            { 0x54, 0x02 }, //Out direction for GPIO5
            { 0x55, 0x02 }  //Out direction for GPIO6
    Thanks a lot for your support
    Regards
    Francesco
  • Hello Francesco,

    In theory both PLL or external clk should be fine , however  personally I prefer using external sclk.

    I doubt  Din switching would be the source of the pop noise, from my experience it has been  the clks that created the pop or click noise. If IC is muted prior to any changes in clk or possible power down/up , then it can prevent pop noise  ( unless a cap is being discharged, which in this case the auto mute can not be of much help!) 

    Looking at the code I don't see any issue,  I am attaching several codes that you can try, hopefully you can remedy the issue. At the end of the day it is the clk issue getting into the DAC and you have to assure the clks are clean.

    PCM512x_ sample code.zip

    Regards,

    Arash

  • Dear Arash,

    after inverting the LRCK#1 with LRCK#2 going to DACs, the pop noise is moved from the first to the second DAC, also receiving the same data stream of original case. So it really seem to be related to the inverted output of the flip-flop, this is very unbelievable. But anyway I can use only the good one LRCK differencing the data stream to DAC with the bit delay. I'm testing this solution,

    Regards

    Francesco

  • Thanks for the update. As i suspected and based on my past experience the source has to be the clks which you confirmed.

    Regards,

    Arash

  • Dear Arash,

    this seem to be a never ending story. Using for both DACs in parallel the same good LRCK#2 the pop noise is not present in DAC#2 but return in DAC#1, incredible!

    There could be an interaction of internal PLL? Is possible to disable the internal PLL and using as master clock the external SCK @22.5792MHz?

    I try this configuration but it doesn't works, could you suggest a sequence of command to setup this?

    Francesco

  • Hello, The integrated PLL on the device provided adds the flexibility to remove the system clock (commonly known as master clock), allowing a 3-wire I 2S connection. The internal PLL can take either SCK or BCK and create the higher rate clocks required by the interpolating processor and the DAC clock. This allows the device to operate with or without an external SCK. So still you need to provide a clean LRCLK but once there is a glitch in your LRCLK ( which seems it exists and randomly shows up) there is not much you can do.  I doubt you can get away with this pop noise as long as your LRCLK is randomly misbehaving.

    If you want to disable PLL ( not using it) , you can refer to Figure 63. PCM512x Clock Distribution Tree. If PLL functionality is not required, set the PLLEN value on Page 0, Register 4, D(0) to 0. In this situation, an external SCK is required.

    Regards,

    Arash