ZT ZZZTTT

SGTL5000 MIC in HP out. error

Discussion created by ZT ZZZTTT on Feb 1, 2019
Latest reply on Feb 4, 2019 by igorpadykov

使用2.048M晶振,3V供电.VDDD1.5V内部供电

使用CHIP_ANA_TEST1寄存器 对SGTL5000进行测试

MIC接口加信号源: 2V ,1KHz

CHIP_ANA_TEST1.TM_SELECT_MIC1

(Enable the mic-adc-dac-HP path)

CHIP_ANA_TEST1.TM_SELECT_MIC=0x0001;

示波器波形为(黄色为信号源 蓝色为HPout)

 

[2.048m crystal oscillator,3V power supply, vddd1.5v internal power supply

The SGTL5000 is tested with the CHIP_ANA_TEST1 register

MIC interface plus signal source: 2V,1KHz

CHIP_ANA_TEST1. TM_SELECT_MIC buy 1

(to Enable the mic - adc and dac - HP path)

Namely CHIP_ANA_TEST1. TM_SELECT_MIC = 0 x0001;

Oscilloscope waveform is (yellow is the signal source and blue is HPout)]

示波器捕捉

 

CHIP_ANA_TEST1.TM_ADCIN_TOHP=0x0001示波器波形为(黄色为信号源 蓝色为HPout))

输出信号已经畸变,

[Chip_ana_test1.tm_adcin_tohp =0x0001 oscilloscope waveform is (yellow is the signal source and blue is HPout))

The output signal has been distorted,]

 

能否告诉我哪里出了问题

这是我的寄存器配置:

[Can you tell me what went wrong

This is my register configuration:]

 

//电源配置

         sgtl5000write(CHIP_LINREG_CTRL_ADD,0x0002);        // add 0x26

         sgtl5000write(CHIP_ANA_POWER_ADD,0x077FF);       // add 0x30

         sgtl5000write(CHIP_REF_CTRL_ADD,0x01C0);               // add 0x28     //1CA //0000

         sgtl5000write(CHIP_DIG_POWER_ADD,0x73);                         // add 0x02

         HAL_Delay(400);

        

//时钟配置

         sgtl5000write(CHIP_CLK_TOP_CTRL_ADD,0x0800);      //add 0x34

         while(0x0800!=sgtl5000read(CHIP_CLK_TOP_CTRL_ADD)) ;

         sgtl5000write(CHIP_CLK_CTRL_ADD,0x0008);                         

        

         //关闭短检测

         sgtl5000write(CHIP_SHORT_CTRL_ADD,0x000A);         while(0x000A!=sgtl5000read(CHIP_SHORT_CTRL_ADD)) ;

                  

         //通路选择

         CHIP_ANA_CTRL.data=0x0000;

         CHIP_ANA_CTRL.SELECT_HP=0x00;// headphone input.0x0 = DAC

         CHIP_ANA_CTRL.SELECT_ADC=0x00;

         CHIP_ANA_CTRL.MUTE_LO=0x0000;

         CHIP_ANA_CTRL.MUTE_ADC=0x0000;

         CHIP_ANA_CTRL.EN_ZCD_ADC=0x0001;

         CHIP_ANA_CTRL.EN_ZCD_HP=0x0001;

         sgtl5000write(CHIP_ANA_CTRL_ADD,   CHIP_ANA_CTRL.data);           // add 0x24

 

         CHIP_SSS_CTRL.data=0x0000;

         CHIP_SSS_CTRL.DAP_SELECT=0x00;//ADC

         CHIP_SSS_CTRL.DAC_SELECT=0x03;//DAP    

         //CHIP_SSS_CTRL.DAC_SELECT=0x00;//DAP

         sgtl5000write(CHIP_SSS_CTRL_ADD,CHIP_SSS_CTRL.data);                            // add 0x0A

        

         //打开AVC增强

         DAP_AVC_CTRL.data=sgtl5000read(DAP_AVC_CTRL_ADD);

         DAP_AVC_CTRL.EN=0x01;

         sgtl5000write(DAP_AVC_CTRL_ADD,DAP_AVC_CTRL.data);         // add 0x0100

        

         //打开DAP

         sgtl5000write(DAP_CONTROL_ADD,0x0001);        // add 0x0100

         //增益调整

        

        

         CHIP_MIC_CTRL.data = sgtl5000read(CHIP_MIC_CTRL_ADD);

         CHIP_MIC_CTRL.BIAS_RESISTOR=0x01;//2k

         CHIP_MIC_CTRL.BIAS_VOLT=0x01;//1.5V

         CHIP_MIC_CTRL.GAIN = 0x0000;//0dB          

         sgtl5000write(CHIP_MIC_CTRL_ADD, CHIP_MIC_CTRL.data);           

 

         CHIP_ADCDAC_CTRL.data = sgtl5000read(CHIP_ADCDAC_CTRL_ADD);

         CHIP_ADCDAC_CTRL.DAC_MUTE_LEFT=0x0000;// bit 2

         CHIP_ADCDAC_CTRL.DAC_MUTE_RIGHT=0x0000;// bit 3

        

         sgtl5000write(CHIP_ADCDAC_CTRL_ADD,CHIP_ADCDAC_CTRL.data);

         sgtl5000write(CHIP_DAC_VOL_ADD,0x3C3C);                         // 0x10          

//测试

         CHIP_ANA_TEST1.data=0x0000;

         //CHIP_ANA_TEST1.HP_CLASSAB=0x0000;

         //CHIP_ANA_TEST1.VAG_CLASSA=1;

         //CHIP_ANA_TEST1.TM_SELECT_MIC=0x0001;

         CHIP_ANA_TEST1.TM_ADCIN_TOHP=0x0001;

         //CHIP_ANA_TEST1.TM_HPCOMMON=0x0001;    sgtl5000write(CHIP_ANA_TEST1_ADD,CHIP_ANA_TEST1.data);

         CHIP_ANA_TEST2.data=sgtl5000read(CHIP_ANA_TEST2_ADD);

 

 

THANKS 

.

Outcomes