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.

How to initialize the Digital(MEMS) Microphone configuration

Other Parts Discussed in Thread: TLV320AIC3262

Hi,

How to Initilize the MEMS Digital microphone  to GPI2, GPIO2 pins.

  • Hi, Venkat,

    The TLV320AIC3262 Application Reference Guide explains how to configure the registers to accept the digital microphone function. I suggest to take a look at section 2.4.3.5.2 Digital Microphone Function.

    I hope this helps you. Please let me know if you have more questions or comments.

    Best regards,
    Luis Fernando Rodríguez S.

  • Hi Luis,

    please explain clearly, I tried the below code snippet but its not working

    I referred this  link   2.4.3.5.2 Digital Microphone Function, please give me the snippet code or configurations for digital mic

    /software reset/
    appI2CWrite2(0x00,0xFF,0x00);
    appI2CWrite2(0x7F,0xFF,0x00);
    appI2CWrite2(0x01,0xFF,0x01);

    //# Configure Power Supplies
    appI2CWrite2(0x00,0xFF,0x01);
    appI2CWrite2(0x01,0xFF,0x00);
    appI2CWrite2(0x7A,0xFF,0x01);//
    appI2CWrite2(0x79,0xFF,0x33);
    appI2CWrite2(0x21,0xFF,0x28);
    appI2CWrite2(0x22,0xFF,0x3e);
    appI2CWrite2(0x23,0xFF,0x10);
    appI2CWrite2(0x08,0xFF,0x00);//Set the input common mode to 0.9V

    //# Clock configuration
    appI2CWrite2(0x00,0xFF,0x00);
    appI2CWrite2(0x04,0xFF,0x00);//Set DAC_CLKIN as MCLK1
    appI2CWrite2(0x0b,0xFF,0x83);//NDAC =1,power up
    appI2CWrite2(0x0c,0xFF,0x84);//MDAC =2,power up
    appI2CWrite2(0x0D,0xFF,0x00);//DOSR MSB=0
    appI2CWrite2(0x0E,0xFF,0x80);//DOSR LSB=128
    appI2CWrite2(0x12,0xFF,0x83);//NADC =1,power up
    appI2CWrite2(0x13,0xFF,0x84);//MADC =2,power up
    appI2CWrite2(0x14,0xFF,0x80);//AOSR =128


    //Signal Processing Settings
    appI2CWrite2(0x00,0xFF,0x00);
    appI2CWrite2(0x3C,0xFF,0x01);
    appI2CWrite2(0x3d,0xFF,0x01);

    //analog power up sequences
    appI2CWrite2(0x00,0xFF,0x01);//page 1
    appI2CWrite2(0x3b,0xFF,0x3c);//left mic pga//0x0c
    appI2CWrite2(0x3c,0xFF,0x3c);//RIGHT MIC PGA set//0x0c
    appI2CWrite2(0x3d,0xFF,0x00);//ADC Analog programmed for PTM_R4
    appI2CWrite2(0x00,0xFF,0x00);//Select Page 0
    appI2CWrite2(0x51,0xFF,0xC0);//Power-up ADC Channel
    appI2CWrite2(0x52,0xFF,0x00);//Unmute ADC channel and Fine Gain = 0dB*/

    /adc power sequences*/
    appI2CWrite2(0x51,0xFF,0xD6);//enable left & right adc channels to digital mic
    /*digital mic setting */
    AIC3262_change_page(4);
    appI2CWrite2(0x65,0xFF,0x05);//Left Channel on GPIO2 Rising Clock Edge, Right Channel on GPIO2 Falling Clock Edge
    appI2CWrite2(0x5C,0xFF,0x10);//GPI2 is enbled for Digital mic input
    appI2CWrite2(0x57,0xFF,0x28);//GPIO2 is ADC_MOD_CLK


    //Output Channel Configuration--headset configurations
    appI2CWrite2(0x00,0xFF,0x00);//Select Page 0
    appI2CWrite2(0x3F,0xFF,0xC0);//Power up the Left and Right DAC Channels
    appI2CWrite2(0x40,0xFF,0x00);//Unmute the DAC digital volume control
    appI2CWrite2(0x00,0xFF,0x01);//Select Page 1
    //Set DAC PTM mode to PTM_P3
    appI2CWrite2(0x03, 0xFF,0x00);
    appI2CWrite2(0x04, 0xFF,0x00);
    //appI2CWrite2(0x0B, 0xFF,0x25);
    appI2CWrite2(0x1F,0xFF,0x87);//Headphone in Ground-centered Mode, HPL Gain=0dB
    appI2CWrite2(0x20,0xFF,0x87);//HPR To have same gain as HPL, set to 0dB
    appI2CWrite2(0x09,0xFF,0x00);//HP Sizing = 100%
    appI2CWrite2(0x1b,0xFF,0x33);//Enable DAC to HPL/R and power-up HPL/R

    /bypass adc data to dac
    appI2CWrite2(0x00,0xFF,0x04);
    appI2CWrite2(0x76,0xFF,0x30);

  • Hi, Venkat,

    Book 0 / Page 4 / Register 101 (Digital Microphone Input Pin Control) is used to configure the data input. Since GPIO2 is used as the digital mic clock, this register must be used for the GPI2 pin. So, I suggest to configure this register as 0x01 (Left Channel on GPI2 Rising Clock Edge, Right Channel on GPI2 Falling Clock Edge).

    Could you try this and let me know if the problem persists?

    Thank you.

    Best regards,
    Luis Fernando Rodríguez S.

  • Hi Luis,

    Thanks,Now its working..