• 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 » Data Converters » Audio Converters » Audio Converters Forum » Flexi Tone Generator TAS3204-EVM
Share
Audio Converters
  • Forum
  • E2E Wiki
Options
  • Subscribe via RSS
Check out
Analog Wire blog
  • $core_v2_blog.Current.Name

    How to determine the power at output of modulator from DAC back-off level

    Posted 21 hours ago
    by Habeeb Ur Rahman Mohammed
    Customers often ask how they can determine the power at the output...
  • $core_v2_blog.Current.Name

    DAC Essentials: What’s with all this glitch-ing?

    Posted 5 days ago
    by Tony Calabria
    When designing with a digital-to-analog converter (DAC), you...
  • $core_v2_blog.Current.Name

    This amplifier doesn't exist...now what?! - Part 2

    Posted 7 days ago
    by Xavier Ramus
    In Part 1 of this post, we looked at the theory involved in making...

Flexi Tone Generator TAS3204-EVM

Flexi Tone Generator TAS3204-EVM

This question has suggested answer(s)
Thomas Deuble
Posted by Thomas Deuble
on May 02 2012 07:46 AM
Intellectual520 points

Hi there,

when I alter the frequency of the flexi tonegenerator during running in PPS on TAS3204-EVM two or three times no tone is produced any more.

Any idea?

Also I will have to alter the tone generator frequency by MCU via I2C. How does a frequency value lets say 0.008333 2(f0/fs) fit into the four byte hex coeficient?

Thanks for any response.

Thomas

TAS3204
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • susan xu
    Posted by susan xu
    on May 02 2012 09:54 AM
    Expert3030 points

    Thomas,

    I am not sure why that after couple of times of changing the frequency, it's stuck, maybe you need to wait for some time before change again? I've never used this generation myself, so not sure what happened.

    But for the I2C message, I checked the code, you need to send the index, not the real frequency to DAP. say the first one on the list the index is 0, the frequency is 25 Hz for 48kHz sampling rate. the second one on the list the value you send would be 0x00000001 and that would be 32Hz for 48kHz sampling rate.

    Hope this helps.

    Susan

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • susan xu
    Posted by susan xu
    on May 09 2012 10:17 AM
    Expert3030 points

    Thomas,

    As you described in your email, what you need is a tone generator that would take a parameter at runtime to generate a tone at certain frequency.

    To realize that and take into account the resource in TAS3x, I think it's doable, we need to do the following:

    1) calculate the initial two samples based on the desired frequency(f0) and sampling rate (fs)and the target amplitude (A):

        y(0) = -1*A*sin(2*pi*f0/fs)

        y(1) = 0;

    2) send these two numbers over the I2C, to realize this

         a) you could reuse most of the .asmx code in flextoneGen, I think the modification would be minor if there's any

         b) you need to modify the .xml file when publishing the component, you need to change the I2C interrupt handler from 97 to 2, 97 is the special handler for flextonegen, 2 is the general handler for 48 bit data transfer

    Please let me know if there's any further info you need from me.

    regards,

    Susan

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • susan xu
    Posted by susan xu
    on May 09 2012 10:52 AM
    Expert3030 points

    Second thought:  We could just calculate alpha and beta as described in the help file and send them through I2C, then we should be able to reuse the template file from flexToneGen.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Thomas Deuble
    Posted by Thomas Deuble
    on May 10 2012 01:29 AM
    Intellectual520 points

    Yes Susan, but how do we get an I2C address to write the alpha and beta values to?

    Thanks for the effort you take.

    Thomas

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • susan xu
    Posted by susan xu
    on May 10 2012 07:22 AM
    Expert3030 points

    Thomas,

    One I2C message is 20 bytes long, one data value is 6 bytes long, so we don't need another I2C sub address to do this, we can use the one that is used to transfer the index right now to transfer the alpha and beta into DAP.  Ok, I'll modify it and attach it here later today and you compare it with the origianl one and you would know what I am talking about.

    Regards,

    Susan

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • susan xu
    Posted by susan xu
    on May 10 2012 11:51 AM
    Suggested Answer
    Expert3030 points

    Thomas,

    I attached the modified .xml files, I may have made a typo here and there, but the idea is there (they're not tested).  When you compare the modified files with the original ones, you will have some idea how it works.

    Regards,

    Susan

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • susan xu
    Posted by susan xu
    on May 10 2012 11:52 AM
    Expert3030 points

    Seems I can only attach one at a time.  Here is the other one.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Thomas Deuble
    Posted by Thomas Deuble
    on May 11 2012 02:53 AM
    Intellectual520 points

    Thank you Susan,

    I just can not find the reason for this eror during code generation because I am not familiar with the whole building process:

    Error: dsp_init_cmds.objectx(17) : undefined property : 'ToneGeneratorFrequency'

    Please see th picture attached as well.

    Do you have any idea?

    Thomas

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • susan xu
    Posted by susan xu
    on May 11 2012 08:09 AM
    Expert3030 points

    Thomas,

    It seems to me that you didn't publish the component properly.  Here is my suggestions:

    1) read the document regarding how to use the component publisher, you could find it in GDE help content

    2) copy everything from FlexToneGen from component cache folder to a separate folder and rename it something else (by renaming the .xml file)

    3) copy the two .xml files I sent you and overwrite the existing ones (also remember to rename the .xml

    4) open the component publisher and load the .xml with the component name and then resave it, then when you reload it, you should be able to see the .xml with the new name (the name you choose) appears in the file list.

    5) Close GDE, publish the component and reopen GDE, see whether the problem still exists.

    Regards,

    Susan

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Thomas Deuble
    Posted by Thomas Deuble
    on May 14 2012 02:55 AM
    Intellectual520 points

    Susan,

    still the same error.

    But I did search the files for ToneGeneratorFrequency and found it in the dsp_init_cmds.objectx:

     -- DSP initialization code for %%prop(InstanceId)
    -- see 8051 file init.c for details
    -- Priority
    &H02
    -- Handler Function
    %%objecthex(%%prop(HandlerFunction1),0,2)
    -- DSP Address
    ## Data address - must be offset by 0x0400
    %%objecthex(%%prop(DSPDataBlockStart1),0x0400,2)
    -- Delay - N/A
    &H00
    &H00
    -- Length
    &H04
    -- Data
    ## The value of an enumerated property is the integer value, which is what is wanted here
    %%objecthex(%%prop(ToneGeneratorFrequency),0,4)

    Do we have to alter this?

    Thanks for any help.

    Thomas

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • susan xu
    Posted by susan xu
    on May 14 2012 07:24 AM
    Expert3030 points

    Thomas,

    I suggest that we get rid of the second line under "recipes" tab in the component publisher and publish the component again,  I think the purpose of .objectx is for the special I2C handler function that was used by the normal fexitongen which we don't use anymore, so you could delete that file from your component file list.

    Let's try this first and see how it goes and also always remember to close and reopen GDE when republish the component.

    Regards,

    Susan

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Thomas Deuble
    Posted by Thomas Deuble
    on May 15 2012 03:08 AM
    Intellectual520 points

    Well Susan, I do get a tone when I run the PF on the EVM. But it is 200 Hz even if it is set to 1kHz alpha = 1.98288... and beta = -0,13052... when I disable and reenable the tonegenerator I sometimes get nothing or a 200Hz square wave or a stange waveform with 12kHz.... Then I did reset the EVM and it goes back to 200Hz. Then I left it enabled and set alpha to 4kHz = 1.7320...and left beta untouched and I get a 4000kHz sinewave! I update beta to -0.5 and it stays fine even if I disable and enable again. Then I try to go back to 1kHz: disable, update alpha and beta, enable no output! disable enable does not change anything: no output. I reset . Back to 200Hz. I leave it enabled and set alpha to anything and then back to 1kHz and I do get a 1khz tone. I update alpha to 200Hz and get a 200Hz squarewave when I then update beta as well the output goes to 0.

    It seem to be working somehow but either not stable or with an unpredictable output.

    Do you have any idea how we can get this right?

    Thanks for any thoughts.

    Thomas

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • susan xu
    Posted by susan xu
    on May 15 2012 07:46 AM
    Expert3030 points

    Thomas,

    There are couple of things we could check:

    1) whether the correct value is transferred to DSP via I2C, this we could check with tool->I2C memory tool, after you updated alpha and beta, first read back from the corresponding I2C subaddress to see whether the values are correct.  Then write the correct value using I2C memory tools to see whether the generator still behave the same

    2) check whether we have correct value in DAP memory.  There is a .lst file under main_rate48 that you could find the address of the alpha and beta used which you could find in the .asmx file.

    3) at the mean time, I'll check the 8051 code to see whether there's anything special about the I2C interrupt handler that was used before, whether there's any scaling involved, which I assumed there isn't.

    regards,

    Susan

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Thomas Deuble
    Posted by Thomas Deuble
    on May 15 2012 09:28 AM
    Intellectual520 points

    Susan,

    please see the screen shot attached:

    the alpha value is right but the beta changes everytime I read the I2C address.

    Thanks,

    Thomas

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • susan xu
    Posted by susan xu
    on May 15 2012 17:03 PM
    Expert3030 points

    Thomas,

    I check the .asmx code, the memory location for beta is used to hold the temporary output, so it was overwritten for each sample, what you observed is correct.  But at least we got alpha right :)

    I also checked 8051 code, there's no scaling for the beta and alpha passed into DAP, so we should be fine.

    We could try couple of things:

    1) try to debug using a smaller .pfw, just an input and output, see whether that makes any difference. 

    2) can you take a look at your resource usuage, how many cycles you already used?  under view-> resources window

    3) could you give me your component, so I could run it in the simulator to see how it's doing.  Of course, if you could do it yourself, it would be better, because it would take some time before I could do it.

    Regards,

    Susan

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
12
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