• 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) » C5000 Ultra Low Power DSP » C5000 Ultra Low Power DSP Forum » FFT hardware accelerator; C5535 USB eZdsp
Share
C5000 Ultra Low Power DSP
  • Forum
  • Announcements
Options
  • Subscribe via RSS
Top 6 Wiki Links
  • C5000 Main Wiki
  • C5000 Software
  • C5515 Boot-Image Programmer
  • CSL (including CSL 3.00)
  • C5000 Connected Audio Framework
  • Porting C5000 Teaching ROM to C5535 eZdsp
  • FFT hardware accelerator; C5535 USB eZdsp

    FFT hardware accelerator; C5535 USB eZdsp

    This question is not answered
    Sam Delacruz
    Posted by Sam Delacruz
    on Apr 09 2012 18:24 PM
    Prodigy50 points
    code.c

    Hey all,

    I’m currently stumped on how to run an fft ( N = 1024) using the C5535 ezDSP from Spectrum Digital. I’ve been trying to use the built in fft co-processor for this. The code was built from information found in the C5535 Technical Reference Manual (spruh87b) and in the TMS320C55x DSP Library Programmers Guide (spru422j).   


    The fft is being performed on some real world data declared as a Uint16 array in the code. The code then goes through the motions of setting everything up , then the fft is executed. After this the results are stored to the SD card using 2 functions found in the CSL examples (Init and mmcConfigFs).

     

    Everything compiles and data is written to the SD card in a file called “data.txt”. Problem is that the data in the file consists of 1024 entries of the same constant value! (This constant value changes on each run of the program).  

    There is also a warning that appears on every compilation 

    "creating output section "data_br_buf" a SECTIONS specification" 


    The lnkx.cmd file was modified to include the following, as per the Tech Ref Manual.


    /* HWAFFT Routines ROM Addresses */

    _hwafft_br = 0x00fefe9c;

    _hwafft_8pts = 0x00fefeb0;

    _hwafft_16pts = 0x00feff9f;

    _hwafft_32pts = 0x00ff00f5;

    _hwafft_64pts = 0x00ff03fe;

    _hwafft_128pts = 0x00ff0593;

    _hwafft_256pts = 0x00ff07a4;

    _hwafft_512pts = 0x00ff09a2;

    _hwafft_1024pts = 0x00ff0c1c;

     

    The SD functions have been removed (they have worked in previous projects) , the array with the 1024 data  points has also been removed .

    I’ve placed the data here:
    http://pastebin.com/tEWdQNq4

     

    sdInit() is here:
    http://pastebin.com/G3mYtW7J


    mmcConfigFs is here:

    http://pastebin.com/0Lf3szkv

     

    The main code is attached to this post

    Any help is greatly appreciated!

    FFT HWAFFT TMS320C5535 1024 point co-processor
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Mark Mckeown
      Posted by Mark Mckeown
      on Apr 10 2012 12:02 PM
      Genius10200 points

      Hi Sam,

      You should check the allocation of your arrays like *scratch and *datatemp their alignment in memory. *scratch is just a pointer (needs memory allocated), *datatemp is not aligned in memory. Make sure they are allocated enough space and on a page boundary. You can see where these arrays are being placed by checking the .map file.

      See SPRABB6

      Also see the HWAFFT code for the C5505 eZdsp (wont run on C5535 but shows correct array declarations and alignment)

      Hope this helps,
      Mark

      ---------------------------------------------------------------------------------------------------------
      Please click the Verify Answer button on this post if it answers your question.

      Also see our C5000 Wiki
      ---------------------------------------------------------------------------------------------------------

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Sam Delacruz
      Posted by Sam Delacruz
      on Apr 10 2012 15:20 PM
      Prodigy50 points

      Mark,

      Thanks for the reply, I'll be sure to try out your recommendations. I'll keep you posted on how it goes.

      Sam

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Sam Delacruz
      Posted by Sam Delacruz
      on Apr 23 2012 06:24 AM
      Prodigy50 points

      Hey Mark ( or anyone else!),

      After many more attempts, I still haven’t been able to trigger an FFT. I’ve followed the recommendations in the preceding post (as best as I could, also looked at the suggested example) but I can’t seem to get it working.

      My current code is here:
      http://pastebin.com/Wd32NW1G

       


      The  “.cmd” file is here:
      http://pastebin.com/VvJPKhwY


      The  “.map’ file is here :

      http://pastebin.com/YYmytuBe



      Screenshot of the fft results using CCS graphing tool ( something graphs  but it’s not correct).

      http://imgur.com/ltaW1,YuG0C#1

      http://imgur.com/ltaW1,YuG0C#0

       

      Also, out_sel  always seems to be 1 which indicates that the fft result  is stored  in the scratch buffer which is at address 0x2060  

       

      Any help is GREATLY appreciated.

       

      Regards,

      Sam

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Sam Delacruz
      Posted by Sam Delacruz
      on Apr 23 2012 06:26 AM
      Prodigy50 points

      Hey Mark ( or anyone else!),

      After many more attempts, I still haven’t been able to trigger an FFT. I’ve followed the recommendations in the preceding post (as best as I could, also looked at the suggested example) but I can’t seem to get it working.

      My current code is here:
      http://pastebin.com/Wd32NW1G

       


      The  “.cmd” is here:
      http://pastebin.com/VvJPKhwY


      The  “.map’ file is here :

      http://pastebin.com/YYmytuBe



      Screenshot of the fft results using CCS graphing tool ( something graphs  but it’s not correct).

      http://imgur.com/ltaW1,YuG0C#1

      http://imgur.com/ltaW1,YuG0C#0

       

      Also, out_sel  always seems to be 1 which indicates that the fft result  is stored  in the scratch buffer which is at address 0x2060  

       

      Any help is GREATLY appreciated.

       

      Regards,

      Sam

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jrvanho
      Posted by Jrvanho
      on May 04 2012 16:09 PM
      Intellectual730 points

      According the FFT App Note:

      "The data and scratch vectors must reside in separate blocks of RAM (DARAM or SARAM) to maximize memory bandwidth."

      It looks like you are putting both of DARAM0. Maybe you should try putting one in DARAM0 and the other in DARAM1.

      Cheers

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jrvanho
      Posted by Jrvanho
      on May 04 2012 16:17 PM
      Intellectual730 points

      Have you made sure to un-idle the FFTHWA after boot?

      Also, looking at the Errata:

      "After hardware reset, on silicon Revision 2.2 C553x devices, the DSP boots via the bootloader code in
      ROM. During the boot process, the bootloader queries each peripheral to determine if it can boot from the
      peripheral. At that time, the required peripheral’s clock will be enabled for the query and then disabled
      when the bootloader is finished with the peripheral. By the time the bootloader releases control to the user
      code, all peripheral clocks will be off and all domains in the ICR, except the CPU domain, will be idled.
      After the boot process is complete, the user is responsible for enabling and programming the required
      clock configuration for the DSP.
      For example on the C5535 device, the bootloader disables both the MPORT and FFTHWA. To enable the
      MPORT and FFT HWA, write 0x000E to the ICR registers and issue an “idle” command."

      Cheers!

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Alex Lee3
      Posted by Alex Lee3
      on May 13 2013 21:46 PM
      Prodigy80 points

      Hi Sam,

      Any updates?  Have you managed to make hwafft work in ezdsp5535?

      Are you using small or other (large) memory model?

      Alex

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • nathan zorndorf1
      Posted by nathan zorndorf1
      on May 13 2013 22:36 PM
      Intellectual835 points

      I would like to know as well, because it seems like there is a problem.
      It seems that the HWAFFT functions require a small memory model, but the CSL requires a large/huge memory model. Is there a workaround? Can I use the CSL as well as the HWAFFT functions?

      Thanks,

      Nate 

      -------------------------------------------------------------------------------------------------------

      Please click the Verify Answer button on this post if it answers your question

      --------------------------------------------------------------------------------------------------------

      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