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.

Linux/TLV320ADC3101: ADC3101 Overflow Interrupt

Part Number: TLV320ADC3101

Tool/software: Linux

HI,

    The configuration of audio codec tlv320adc3101 has been a success and we are able to capture the audio using mic input but we are getting continuous overflow interrupt while trying to do recording

As per the datasheet, Overflow interrupt happens when the AGC target level is kept very high and the energy in the input signal increases faster than the attack time. So, we tried to reduce the AGC Target Level to Minimum and tried but we are facing the same issue also we tried to control the attack time. 

By Default AGC Target Level is set to -5.5db

Below are the configuration settings for reference,

Page 0 Register Setting:

No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 00 20 00 00 11 04 00 00 00 00 00 00 00 00 00 .. ..??.........
10: 00 00 01 02 80 80 04 00 00 00 01 00 00 02 01 00 ..?????...?..??.
20: 00 10 00 00 22 00 02 00 00 00 00 00 00 00 00 00 .?..".?.........
30: 16 00 00 15 00 12 02 02 00 00 00 44 00 02 00 00 ?..?.???...D.?..
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
50: 00 00 00 00 00 00 80 3e 50 50 00 0c 03 00 80 3e ......?>PP.??.?>
60: 50 50 00 0c 03 00 00 00 00 00 00 00 00 00 00 00 PP.??...........
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

Page 1 Register Setting

No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ?...............
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
30: 00 00 00 50 fc 00 3f fc 00 3f 00 46 46 00 00 00 ...P?.??.?.FF...
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

Thanks,

Mohan

  • Hi, Mohan,

    In order to have a better approach to this, could you try disabling the AGC function of the ADC3101? Do you still get an overflow?

    Best regards,
    Luis Fernando Rodríguez S.
  • Hi Luis,

    By disabling AGC function, we didn't receive any Overflow interrupt.

    Please find the attachment for the register changes made after disabling AGC

  • Hi, Mohan,

    Based on your registers configuration, it seems that the decay time is not being configured. It seems to be placed in default state. Could you try increasing this time?

    Additionally, could you try reducing the analog inputs gain from 0dB to -6dB? (Please take a look at the page 1 / registers 52-55 for details).

    Best regards,
    Luis Fernando Rodríguez S.
  • Hi Luis,

    Sorry for the delayed response

    We have configured decay time(both Left and Right) to 0x50, and we reduced the input gain to -6db as mentioned in the prev post. 

    Here are the observations we made,

    1. As in silent environment, there is no Overflow Interrupt. But whenever we tried to play something or given input as a human voice, we are getting an Overflow interrupt. 

    2. We configured both Decay time and Attack time as 0c50. Can we know what is the recommended Decay time, Attack time for both left and right?

    Hereby I'm attaching the register configurations for your reference,

    adc.txt
    Page 0:
         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
    00: 00 00 20 00 00 91 04 00 00 00 00 00 00 00 00 00    .. ..??.........
    10: 00 00 81 82 80 80 04 00 00 00 01 00 00 02 01 00    ..?????...?..??.
    20: 00 10 00 00 66 00 02 00 00 00 00 00 00 00 00 00    .?..f.?.........
    30: 17 00 00 15 00 12 02 02 00 00 00 44 00 02 00 00    ?..?.???...D.?..
    40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    50: 00 c0 00 00 00 00 80 3e 50 50 50 0c 03 50 80 3e    .?....?>PPP??P?>
    60: 50 50 50 0c 03 50 00 00 00 00 00 00 00 00 00 00    PPP??P..........
    70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    Page 1:     
         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
    00: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ?...............
    10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    30: 00 00 00 50 fd 00 3f fd 00 3f 00 46 46 00 00 00    ...P?.??.?.FF...
    40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    
    

  • Hi Luis,

    Is there any update on this ?

  • Hi, Mohan,

    Could you provide details about the input signal level that you are using? If the input level is too high, there's a risk to have an overflow even if the AGC is configured correctly.

    Additionally, could you provide the clock values that you are using (MCLK, BCLK and WCLK)?

    Best regards,
    Luis Fernando Rodríguez S.
  • Hi Luis,

    Could you provide details about the input signal level that you are using?

    >>>> Input is "Human voice " and its intensity is nominal.

    Clock values that you are using (MCLK, BCLK and WCLK)?

    >>> MCLK -> 4.096MHz
    >>> BCLK -> 512KHz
    >>> WCLK -> 16KHz
  • Hi, Mohan,

    When the PLL is used, it is required to respect the datasheet conditions described in Audio Clock Generation section:

    www.ti.com/.../slas553b.pdf

    You are using a MCLK = 4.096MHz and a 16-KHz sampling rate (WCLK). So, I would recommend to use the following PLL values:

    P = R = 1
    J = 24
    D = 0
    NADC = 8
    MADC = 6
    AOSR = 128

    Best regards,
    Luis Fernando Rodríguez S.
  • Hi Luis,

    We configured the values as per the MCLK, We didnt receive any interrupts.

    Configured Registers,

    MCLK = 4.096MHz
    BCLK = 512KHz
    WCLK = 16KHz
    P = R = 1
    J = 24
    D = 0
    NADC = 8
    MADC = 6
    AOSR = 128

    Issue's Faced:

    1.) Recorded File has no clarity and is very bad to hear.

    2.) As Changing the NADC and MADC to the default settings, we are getting an clear voice as in pervious, but we are receiving interrupts.

    Could you give me the registers values for our MCLK as mentioned above?
  • Hi, Mohan,

    You would need to configure the PLL as the following values:

    Page 0 / Register 4: 0x03 (MCLK as PLL_CLKIN, PLL_CLK as CODEC_CLKIN)
    Page 0 / Register 5: 0x91 (PLL enabled, P = R = 1)
    Page 0 / Register 6: 0x18 (J = 24)
    Page 0 / Register 18: 0x88 (NADC enabled, NADC = 8)
    Page 0 / Register 19: 0x86 ( MADC enabled, MADC = 6)

    Best regards,
    Luis Fernando Rodríguez S.
  • Hi Luis, 

    These are the register configurations we had set as per your suggestions. But, we are still receiving Overflow interrupt. 

    Below are the interrupts we are Keep on receiving on all the time,

    *  Left ADC overflow flag
    * ADC barrel-shifter output-overflow flag
    * Right ADC overflow flag

    Below are the testing Made:

    1. As the input signal is within 1 meter, we are not receiving any overflow Interrupt.

    2. As Speaker is connected nearby Mic, When we are trying to play thro' Speaker and parallelly recording then we are receiving Overflow Interrupt.

    Below are the register configurations,

  • Hi Luis,

    Any update on this?

  • Hi, Mohan,

    Sorry for this late reply. Could you tell me if the overflow flag is enabled without any signal at the analog input? Additionally, could you provide the signal level or any capture of you analog input?

    Thank you.

    Best regards,
    Luis Fernando Rodríguez S.
  • Hi Luis,

    By Default, Overflow flag is configured as an Interrupt.

    As I previously mentioned, the human voice is given as an input.

    I'll be sharing the captured files hereby, with the configuration's as Sampling Frequency as 16k and MCLK as 4.096M, tested with different ranges(in meters).

    As Closely analyzed, We are not receiving any Overflow interrupt, if the input signal(human voice) is more than 0.5meters.

    We do try to play a music, and we have observed the same behavior, we only receive Overflow flow interrupt, if the input signal is very close to the connected microphone.

  • Hi Luis,

    any update on this?

  • Hi, Mohan,

    Thank you for the recorded sounds, they were helpful to understand this situation.

    It seems that the overflow interrupt is enabled because the sound in more intense below 0.5 meters. So, if you are looking to eliminate this overflow interrupt, you would need to reduce the signal level with the help of the PGA. Particularly, I would recommend to use the AGC and fix a target level. In that way, the overflow interrupt will not be enabled even at 0.5 meters or below.

    Please let me know if this was clear and if you have additional questions or comments.

    Best regards,
    Luis Fernando Rodríguez S.
  • Hi Luis,

    We tried for different target levels and we observed, as the target level decreases, the occurrence of overflow interrupt is less, but still we seen in fewer numbers and also the quality of sound(less intense) gets decreased.

    Could you please recommend the AGC parameters values to configure as mentioned?

  • Mohan,

    In addition to the low target level, I recommend to increase the attack and decay times. The target level in some cases takes a lot of time to be reached. This enables the overflow flag. However, if the attack and decay times are increased, the target will be reached quickly, avoiding to enable the overflow flag.

    Best regards,
    Luis Fernando Rodríguez S.
  • Hi Luis,

    As per our experiments and observations, by decreasing the target level and increasing the attack and decay times, we have seen less intensity at the microphone end. Below is our observations,

    Target Level Attack Time Decay Time Analog Input Gain Overflow interrupt Status Intensity
    Distance(2m) Distance(0.2m)
    High(-5.5) 0x50 0x50 -6dB No Enormous Norrnal
    High(-5.5) 0x59 0x59 -6dB No Less Very Less
    High(-5.5) 0x5f 0x5f -6dB No Less Very Less
    High(-5.5) 0xa0 0xa0 -6dB No Enormous Satisfactory
    -10 0xa0 0xa0 -6dB No Enormous Nornal
    -10 0xa4 0xa4 -6dB No Less Very Less
    -14 0xa0 0xa0 -6dB No Less Normal

    If we are decreasing the target level, the intensity of the sound gets decreased irrespective of the attack and decay time.

    As we observed, the intensity is inversely proportional to the attack and decay time.

    We tried all the scenarios as you suggested, but we can't able to overcome Overflow Interrupt occurring.

    It would be very helpful if you suggest the recommended register values.

  • Hi, Mohan,

    As mentioned in the datasheet the overflow flag may appear due to saturation or distortion in the input. Additionally, if the AGC target level is kept very high and the energy in the input signal increases faster than the attack time. So, it is important to have a low AGC level(I would recommend -10 or -14dB) and a high attack time (I would recommend to use a value around the 10 x (32/fs) and if you require additional time, you may use the multiply factor (page 0 / register 89 for left channel and page 0 / register 97 for right channel).

    Additionally, I noticed in your registers configuration that the page 0 / register 48 is configured as 0x16. It means that you interrupt INT1 is enabled for overflow flags, AGC noise and ADC data-available. Could you try configuring it only for overflow flags (0x04)?

    Best regards,
    Luis Fernando Rodríguez S.
  • Hi Luis,

    As per the suggested recommended values, we modified the params and tested for different cases,

    AGC Level(in dB) Attack Time Interrupt Config Occurance of Overflow Interrupt (Observation carried out for 2-3seconds) Intensity of Sound
    2m 1m 0.5m Closely ( In Distances)
    -14 0x50 (11*(32/fs) Only Overflow (0x04) 0 0 1-3 4-5

    Audible.

    -14 0x50 (11*(32/fs) All (0x16) 0 0 1-3 4-5 Audible
    -14 0x40 (9*(32/fs) Only Overflow (0x04) 0 0 1-3 4-5 Audible
    -14 0x40 (9*(32/fs) All (0x16) 0 0 1-3 4-5 Audible
    -10 0x50 (11*(32/fs) Only Overflow (0x04) 0 0 2-5 20-40 Audible
    -10 0x50 (11*(32/fs) All (0x16) 0 0 2-5 20-40 Audible
    -10 0x40 (9*(32/fs) Only Overflow (0x04) 0 0 2-5 20-40 Audible
    -10 0x40 (9*(32/fs) All (0x16) 0 0 2-5 20-40 Audible

    As we observed only by configuring Overflow as an interrupt, there is no huge change in Interrupt Hit.

    Though we tested for the recommended values, still we are receiving overflow interrupts. 

    As per our use case, It should be audible up to the distance of 2meters.

    We also connected a Speaker nearby to the Microphone. So, It doesn't seem to reduce to Zero as the recommended values

    So, It doesn't seem to reduce to Zero as the recommended values too, If Speaker tries to plays as the recording is in Progress, also we are receiving continuous Interrupts.

  • Hi Luis, 

    Could you update on this?

  • Mohan,

    Could you also select the maximum AGC gain? You would need to allow to the AGC to reach the maximum level. Additionally, could you enable the noise gate threshold? Please use the noise gate in the maximum level, otherwise the could be an increment in the noise level due to the AGC gain.

    Best regards,
    Luis Fernando Rodríguez S.
  • Hi Luis,

    Could you also select the maximum AGC gain?

    Yes, by default we had set to High Value (40dB).

    Please use the noise gate in the maximum level,

    If we configured Noise Threshold to Maximum Level (ie, -30dB) from registers 87 and 95, we had observed a huge silence, So there is no intensity in the Sound and in this case we didn't receive any Overflow Interrupt from above 0.2-meter distance. Only if we tried to Speak Very Loud from 0m Distance apart, It received 2-5 interrupts.

    We Had also observed, the below Interrupt too,

    Right ADC signal power lesser than noise threshold for right AGC

    Left ADC signal power lesser than noise threshold for left AGC.

    Below are the Configured register Values,

    AGC target level : -10dB

    AGC noise threshold : -30dB

    AGC maximum gain: 40 dB

    AGC attack time: 10 x (32/fs) ( Register Value :0x40)

    AGC decay time: Register Value : 0x50

    I Hope above all are the recommended values.

  • Hi Luis,

    Any update on this?

  • Hi Luis,

    Any update on this?

  • Hi Luis, 

    We would like to know if there is any input needed from our side?