• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Digital Signal Processors (DSP) » OMAP™ Processors » OMAP-L13x, AM1x and C674x Processors Forum » AIC3106 + OMAPL137 ... Lag?
Share
OMAP™ Processors
  • Forums
  • Announcements
Options
  • Subscribe via RSS
Resources
  • OMAP-L1x DSP+ARM9™-based Processors Product Folder
  • OMAP3525/30 DSP+ARM Cortex™-A8-based SOCs Product Folder

  • Top OMAPL Wiki Links
  • OMAPL3x Schematic Review Checklist
  • OMAPL13x Boot resources

  • OMAPL Document Resources
  • OMAPL137 Technical reference manual
  • OMAPL138 Technical reference manual
  • OMAPL Boot loader App Notes
  • AIC3106 + OMAPL137 ... Lag?

    AIC3106 + OMAPL137 ... Lag?

    This question is not answered
    RobinVujanic
    Posted by RobinVujanic
    on Mar 05 2009 11:20 AM
    Prodigy240 points

    I have the OMAP-L137 / TMS 320C6747 Starter Kit.

    I am using the code provided in <CC Studio Dir>\boards\evmomapl137_v1\dsp\tests\aic3106 in order to sample a signal on one of the input audio jacks, elaborate it and then sending it back on one of the output audio jacks. I didn't touch much of the code that is given there, the whole elaboration algorithm is done on the sample of the Left channel, the right one just gets copy pasted.

    Anyway.

    Even if, between reading the buffer where the sample is saved (MCASP1_RBUF0_32BIT) and writing it to the output buffer, I don't do any elaboration (I just "copy paste" it exactly as I do for the right channel), I still can observe, with an external oscilloscope, that there is a lag of approximately 40 samples between what is being input in the board and what the board is outputting (i.e., which is, again, just a copy of the input signal).

    I have also observed that the output gets inverted in polarity, but this is not a huge problem.

    Where does this Lag come from? I guessed it was due to some filter in the ADC/DAC process but wasn't able to find much in the AIC3106 manual.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Joe G.
      Posted by Joe G.
      on Mar 05 2009 13:31 PM
      Genius14420 points

      A quick glance of the aic3106_loop_xxx.c code code looks like a straight copy as you mention. 

      In the data sheet slas509e.pdf available at: http://focus.ti.com/docs/prod/folders/print/tlv320aic3106.html , p. 8 mentions an ADC group delay of 17 and p. 10 mentions a DAC group delay of 21.  I think that adds up to the number of sample delay  you are seeing (if I am reading the units correctly). 

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • RobinVujanic
      Posted by RobinVujanic
      on Mar 06 2009 05:28 AM
      Prodigy240 points

      <3

      It looks like that is it : )

      Thank you.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • RobinVujanic
      Posted by RobinVujanic
      on Mar 06 2009 06:10 AM
      Prodigy240 points

      On page 51 there is a configuration for the control register page0/register9 that seems to indicate that the group delay may be variable during operation.

      On the other hand, "linear phase" should mean that I will be getting the same delay independent of the frequency of the signals.

      So how do I have to see this? Are changes in the group delays "rare" and the configuration register is there just for safety reasons, or are such delays very regular?
      How do these changes in group delay come about? And is there any way to predict by how much they will change?

       

      EDIT Feel free to point me to pertinent books on the matter. I am obviously not very familiar with what is happening "behind the scenes" with these ADCs/DACs.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Joe G.
      Posted by Joe G.
      on Mar 06 2009 10:14 AM
      Genius14420 points

      Good question.  I really don't know that specific on the data converters.

      Have you tried posting on one of the TI Analog Forums?

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • RobinVujanic
      Posted by RobinVujanic
      on Sep 15 2009 10:44 AM
      Prodigy240 points

      I can confirm that there is some "jitter" on the group delay, i.e. the group delay changes from one reset of the CPU to another, and possibly even during the same run.

      I have found out that the aforementioned Register 9 / Page 0 fixes this to some extent, or in other words: if the phase of the signal you are sampling is important to you, you want to set to 1 the D1 and D2 bits of this register (i.e. ADC/DAC Re-Sync), see slas509e page 51.

      Robin.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Dimitry Denisov
      Posted by Dimitry Denisov
      on Apr 03 2012 10:49 AM
      Prodigy210 points

      Hi!

      Even if i set bits D1 and D2 in register 9 i get jitter of group delay. As i suspect the range of this deviation of delay is within +-1/4 1/Fs.

      Is there any ability to eliminate jitter at all?

      As i understand aic3106 and mcASP clocked from one source crystal.... 

      In pdf on page 51 :

      D2 R/W 0 DAC Re-Sync
      0: Don’t Care
      1: Re-sync stereo DAC with codec interface if the group delay changes by more than ±DACFS/4.
      D1 R/W 0 ADC Re-Sync
      0: Don’t Care
      1: Re-sync stereo ADC with codec interface if the group delay changes by more than ±ADCFS/4.

      But what is ADCFS/4 ? Is this a time?  What is the mechanism of synchronization?
      Have anybody additional information on this topic? Datasheet is poor... 
      Thanks

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Tobias Brack
      Posted by Tobias Brack
      on Jun 15 2012 06:15 AM
      Prodigy160 points

      Hello all,

      I want to pick up the topic again and ask, if anybody has an idea how eliminate the jitter on the group delay.

      I'm as well interested in a group delay that is as stable as possible.


      Best regards,

      Tobias

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Dimitry Denisov
      Posted by Dimitry Denisov
      on Jun 15 2012 06:34 AM
      Prodigy210 points

      Hello.

      After some time of experimentation i can also say that Register 9 / Page 0 fixes this jitter. Please, Try to set  bits D1 and D2. This synchronize analog clock and digital clock.  

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Tobias Brack
      Posted by Tobias Brack
      on Jun 18 2012 04:12 AM
      Prodigy160 points

      Hello,

      thank you for your qick reply. I tried it and the jitter becomes better, but not perfectly equal between several restarts (difference about 4 1/fs). As you seem to be very experienced with the device, I have another question:

      I observed a strange behavior at line in, when I take a continuous signal as input. The attached picture shows the first 100 samples of the line in signal. Input is a pure sinusoid with 500 Hz. First of all the lag time is more than the 17/fs declared for the ADC. Secondly, there is a strange high frequency signal (about fs/2) which I cannot explain.
      Have you ever obserced a similar behaviour or do you have a hint what the reason could be?

      I would be glad if you can help me.

      Best regards
      Tobias

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Dimitry Denisov
      Posted by Dimitry Denisov
      on Jun 18 2012 04:49 AM
      Prodigy210 points

      Tobias Brack

      I observed a strange behavior at line in, when I take a continuous signal as input. The attached picture shows the first 100 samples of the line in signal. Input is a pure sinusoid with 500 Hz. First of all the lag time is more than the 17/fs declared for the ADC. Secondly, there is a strange high frequency signal (about fs/2) which I cannot explain. 

      Have you ever obserced a similar behaviour or do you have a hint what the reason could be?

      1. Can you describe the arrangement of your experiment in more details? Do you use external sine generator?

      2. I saw this distortion at the sample beginning. I didn't deeply analyze this but think this connected with transients in the input digital filter of ADC.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Tobias Brack
      Posted by Tobias Brack
      on Jun 18 2012 06:36 AM
      Prodigy160 points

      Hello,

      1. I have an external signal generator, providing the continuous signal. The output goes directly to LINE1L with an Amplitude of ca. 0.1Vpp. The output is already active, then the DSP code is started and the input is saved as a text file.
      The code is based on one of the codes of the aic3106 test. (aic3106_loop_linein.c).

      My application is similar to what Robin Vujanic has posted so time ago. The input, coming from an external system, is used in a control loop running on the DSP to regulate the output signal. The aim is to control the phase between in- and output. Therefore a constant phase shift due to the DSP is essential.

      2. this was my guess too. I can handle the distortions at the beginning, but I guessed this could be related to the different lag times, what is very problematic for my application.

      Currently I am working with fs=48kHz, probably it would be worth a try to go to 96kHz. Do you have experience with that?

      Thanks for your held and best regards
      Tobias

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Dimitry Denisov
      Posted by Dimitry Denisov
      on Jun 18 2012 07:06 AM
      Prodigy210 points

      1. Unfortunately i am not introduced with sample you mean aic3106_loop_linein.c. As a suggestion, note that most likely this sample uses some input and output buffers (for ping pong). Perhaps you see this empty read buffer  + 17 samples at the beginning  of captured data?

      2. I run ADC and mcASP at 24 kHz rate. Try ADC HIGH-PASS FILTER configuration (SLAS509E page 32). Maybe it is switched on? 

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Tobias Brack
      Posted by Tobias Brack
      on Jun 18 2012 12:39 PM
      Prodigy160 points

      to 1. This is a good hint, I will try to find the place where the buffer is defined.
      to 2. ADC Highpass is off.

      FYI attached the files for the aic3106 test, that I took as a sample.

      6064.aic3106.zip

      Best regards
      Tobias

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use