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.

TLV320ADC3101: Receiving 2-3 times the same sample value when reading decimated values from TLV via I2S

Part Number: TLV320ADC3101

Hi all,
I would like to use the TLV320ADC3101 to decimate 2 digital PDM microphones (L/R) with a decimation factor of 128. As I want to get values with a sample rate of 16kHz and 16bit per mic over I2S a microcontroller provides BCLK (512kHz) and WCLK (16kHz). The IC’s PLL is configured to provide the microphone CLK (2.048Mhz).

I am able to receive values with the desired sample rate but the problem is that I always get 2 or 3 times the same value which results in a bad sound. First I thought there is a problem with receiving the data at the microcontroller but after going through the configuration of the microcontroller again I looked at the incoming data with an oscilloscope and I saw that the TLV is really sending me 2 or 3 times the same values for left and right mic.

I already tried to following:
• send 24bit instead of 16bit to get a higher resolution -> also results in 2 or 3 repeated values.
• Give more time for each frame -> Increase Bclk to 1.024MHz (incl new PLL settings) but with the same WCLK (16kHz). Frame length 32bit where I am sending 16 data bits and the remaining 16bits nothing (for left and right)-> again 2-3 repeated values
• …

Do you have any idea what may be wrong? When does the TLV normaly sends the same data (timing problem, no new value available, ... ?)

Thank you,
Mike

  • Hi, Mike,

    This is not a common behavior for this device, have you tried to verify if this issue occurs only when digital mic is used?. I would recommend you to try using the analog inputs of the device as the ADC source and see if the repeated sample issue is replicated with analog input. 

    I think the issue might be related to the clock settings, can you please share the clock configurations you used for this device?. 

    Best Regards,

      -Diego Meléndez López
       Audio Applications Engineer

  • Hi Diego,

    Thank you for your fast reply.

    Unfortunately it is not possible for me to test it with an analog microphone because the TLV (wired with the digital microphones) is mounted on a PCB with my layout. For my usecase I just want to use the TLV to decimate the PDM Data from 2 microphones and send it via I2S to the microcontroller where it is processed.

    My clock settings are the following:

    • BCLK=1024kHz (-> PLLCLK_IN)
    • WCLK=16kHZ
    • For each mic channel
      • word-length=16bit 
      • frame-length=32bit 

    • PLL:
      • P=1
      • R=2
      • D=0000
      • J=40
      • NADC_DIV=40
      • ADC_DIV=1
    • Resulting Microphone CLK=2048kHz (-> CLKOUT) (I also measured this)
    • Processing Block 1
    • ADC Interface wordlength=16bit
    • AOSR=128

    Additional here is how i configure the TLVs register:

    Register Value
    0 0x00
    1 0x01
    4 0x07
    6 0x28
    7 0x00
    8 0x00
    5 0x92
    delay 10ms
    18 0xA8
    19 0x81
    27 0x00
    51 0x28
    52 0x04
    53 0x02
    61 0x01
    80 0x02
    81 0xCE
    82 0x00
    83 0x68
    84 0x68

    Maybe there is something wrong in the order how the registers are set?

    Best Regards,

    Mike

     

  • Hi, Mike,

    Thanks for the feedback. If you are not able to test with an analog input, it may be difficult to isolate the root cause to the device. I reviewed your register configuration and settings, everything seems fine, but would like to ask you to try disabling the bus keeper function of DOUT in register 53.

    Unfortunately, I don't have a digital mic with me to try your code in the EVM. Can you please confirm that the I²S clocks are as expected?.

    Best Regards,

      -Diego Meléndez López
       Audio Applications Engineer

  • Hi Diego,

    Thank you for your reply.
    Unfortunately I don‘t have any analog microphones as I just would like to use digital ones. I mean I could try soldering some wires to the IC and connect a function/wave generator to it but it isn‘t the easiest way because of the size of the TLV.
    But what I have done so far is that I used an AudioPrecicion to capture the data before the TLV (PDM Data) and after the TLV (I2S 16bit data stream). Before the TLV the captured sound is clear after the TLV and the decimation process the sound is the same as when I receive the data with the microcontroller -> always 2-3 times the same sample value. (I did this Audio Precicion test to be sure that I don‘t have the error at the microcontroller)

    I already disabled the DOUT Bus keeper, unfortunately that did not solved my problem.

    I measured the frequency of all clocks (see first attached image):

    BCLK=1024khz (green)
    WCLK=16kHz   (red)
    Microphone Clk=2048kHz
    MCLK is not used.

    I2S Data Stream with 2 times the same value for left and right channel  (blue).

    The second attached image shows the PDM-Data signal (blue) and Microphone CLK.(green) and the cursers show the delay between them (max. approx. 100ns).


    I really appreciate your help!
    Thank you,
    Mike

  • Hi Mike,

    I have reviewed your configuration setting and found one issue which could explain why you are getting not proper recording data. Can you modify the configuration for the below mentioned register as follows :

    delay 10ms

    18 0x94

    19 0x82

    Basically program "NADC" divider as "20" instead of "40" and MADC divider as "2" instead of "1". The reason this change is require because for internal DSP processing you have selected PRB_R1 which atleast 188 cycles for processing as mentioned in datasheet page-31. With your configuration the DSP was getting only 128 cycles and with the above mentioned update the DSP will get now 256 cycles which is more than 188 cycles. 

    Please let us know the test results with the above mentioned changes in device configuration. I hope with this changes you will get the proper digital microphone record output.

    Regards,

    Uttam

  • Hi Uttam,

    i tried your suggested solution and that solved my problem. :)

    Thank you very much for giving me that hint! Now I can go finally go on with the development of my project.

    Best Regards,

    Mike