SGTL5000 - Microphone Noise -- Need Help

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SGTL5000 - Microphone Noise -- Need Help

1,828 Views
akshaymishra
Contributor I

Hello,

        I am using the SGTL5000 in following setting:

It is an I2S slave, configured for 8KHz sampling. I have tried both synchronous and asynchronous mode. I am using the Teensy Audio board (PJRC Store ) for the setup. It takes 3.3V and has external 1.8V VDDD.

My configuration is given at end of my query. The observation is

There is a constant background noise being heard, even when we do a SGTL Internal Loopback. After too much hair-pulling, setting the BIAS_CTRL to -50%, the noise went away but so did the audio. At -37.5% BIAS_CTRL the noise is less but still present and unacceptable.

What is the solution to get rid of this noise?

---Configuration-----

/ Value which is used in Bitbucket code with PLL
    uint32_t delay;

    SgtlRegWrite(SGTL5000_CHIP_ANA_POWER, 0x4060); // Power down everything but ADC, DAC  and Ref Currents Power Up
    SgtlRegWrite(SGTL5000_CHIP_LINREG_CTRL, 0x006C);  // Manually assign charge pump source to VDDIO
    SgtlRegWrite(SGTL5000_CHIP_REF_CTRL, 0x001F2);     // Set VAG = 1.575
    SgtlRegWrite(SGTL5000_CHIP_LINE_OUT_CTRL, 0x0000);// No-op
    SgtlRegWrite(SGTL5000_CHIP_SHORT_CTRL, 0x4446);   // Disable short control
    SgtlRegWrite(SGTL5000_CHIP_ANA_CTRL, 0x0122);     // Unmute DAC/ADC and select proper sources for mic/headphone
    SgtlRegWrite(SGTL5000_CHIP_PLL_CTRL,0x8312); 

#ifdef USE_MONO_CHANNEL
    SgtlRegWrite(SGTL5000_CHIP_ANA_POWER, 0x53A); // Power down everything but mic, dac, HP,
    SgtlRegWrite(SGTL5000_CHIP_ANA_POWER, 0x5BA); // Enable VAG
#else@
    SgtlRegWrite(SGTL5000_CHIP_ANA_POWER, 0x457A); // Power down everything but mic, dac, HP,
    SgtlRegWrite(SGTL5000_CHIP_ANA_POWER, 0x45FA); // Enable VAG
#endif

    SgtlRegWrite(SGTL5000_CHIP_DIG_POWER, 0x0063); // ADC, DAC, I2S_IN, I2S_OUT

    delay = 1000000u;
    while(--delay);

    SgtlRegWrite(SGTL5000_CHIP_LINE_OUT_VOL, 0x0F0F); // Max out the attenuation for line out
    SgtlRegWrite(SGTL5000_CHIP_CLK_CTRL, 0x003B);  // Fs = 48/6 KHz, MCLK=256*Fs
    SgtlRegWrite(SGTL5000_CHIP_I2S_CTRL, 0x01B0);  // 16-bit, Master, SCLK = 32Fs,
    SgtlRegWrite(SGTL5000_CHIP_SSS_CTRL, 0x0010);  // I2S_IN->DAC, ADC->I2S_OUT


    SgtlRegWrite(SGTL5000_CHIP_ADCDAC_CTRL, 0x0000);
    SgtlRegWrite(SGTL5000_CHIP_DAC_VOL, 0x3C3C);   // 0dB for both channels
    SgtlRegWrite(SGTL5000_CHIP_ANA_HP_CTRL, 0x0C0C);  // 0dB volume in both HP channels
  
    SgtlRegWrite(SGTL5000_CHIP_ANA_ADC_CTRL, 0x0000); // No loss in ADC volume
    SgtlRegWrite(SGTL5000_CHIP_MIC_CTRL, 0x0170);     // MIC BIAS output impedance 2kOhm, BiasV = 3V, ampli gain = +0dB
    SgtlRegWrite(SGTL5000_CHIP_CLK_TOP_CTRL, 0x0000); // Disable the internal osc
    SgtlRegWrite(SGTL5000_DAP_CTRL, 0x0000);     // Disable DAP

Tags (1)
0 Kudos
3 Replies

836 Views
igorpadykov
NXP Employee
NXP Employee

Hi Akshay

one can check AN3663 programming app note

Application Notes (3)

AN3663, SGTL5000 Initialization and Programming - Application Note (REV 3.0)

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=SGTL5000&fpsp=1&tab=Documentation_Tab

or SGTL5000 example in i.MX53 OBDS

Lab and Test Software (2)

On-Board Diagnostic Suit for the i.MX53 Quick Start Board (REV 2011.39)

http://www.nxp.com/products/power-management/pmics/pmics-for-i.mx-processors/i.mx53-quick-start-boar...

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

836 Views
akshaymishra
Contributor I

Thanks Igor -- I rechecked with the AN3663 -- also the configuration is not different (even changed the initialization sequence to match that in the i.MX53 suggested) but without any success.

The continuous background hum is always present. My sampling being 8KHz, I fed it 2.048MHz (8*256) and my MCU can only feed it 2048780 Hz, can the 0.000780 MHz difference cause this ? I also tried feeding 12MHz in PLL mode with same results...

0 Kudos

836 Views
iggi
NXP Employee
NXP Employee

It looks like the cause of the problem is the frequency of the main oscillator used for clocking the system.
I am very much sure that if you would use 24.576Mhz crystal oscillator or 12.288MHz one, you will get much better result.

You may want to see this post:
What am I doing wrong with TWR-SGTL-AUDIO, SCH-26816 REV B, why can't I seem to get LINEIN->DAP(M...

Regards,

iggi

0 Kudos