• 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) » C6000 Single Core DSP » C67x Single Core DSP Forum » [C6713] DSPF_sp_fir_gen causes runtime error
Share
C6000 Single Core DSP
  • Forums
  • Announcements
Options
  • Subscribe via RSS

Forums

[C6713] DSPF_sp_fir_gen causes runtime error

This question is answered
Robert9862
Posted by Robert9862
on Mar 03 2009 18:47 PM
Intellectual310 points

When using the following line of code in my program (on a DSK6713 board), it crashes after a just a few minutes:

DSPF_sp_fir_gen(in, H, &out[LENH-1], LENH, bufferSize+bufferOverlap-LENH+1);

The filter coefficients H and LENH are defined as follows:

#pragma DATA_ALIGN(H,8);  // aligns H to a double-word (8 byte)
const Float H[] = {-0.0634641714188635 , 0.593677714458985 , 0.530933189234723 , -0.0611467322748454};
const Uns LENH = 4;

And the in and out buffers are allocated like this:

in = (Ptr)MEM_calloc(0, (bufferSize+bufferOverlap)*4, 8);
out = (Ptr)MEM_calloc(0, (bufferSize+bufferOverlap)*4, 8);

So in, H, and even out are double-word aligned and also the other requirements for DSPF_sp_fir_gen are fulfilled.

After program crash, when I try to halt the processor, the emulator gives the following error message and I have to restart everything:

Trouble Halting Target CPU:
Error 0x80000020/-1070
Fatal Error during: Execution,
An unknown error prevented the emulator from accessing the processor in a timely fashion.

What am I doing wrong? Any ideas?

Kind regards

Robert

C6000 DSK6713 DSP/BIOS C6713 C671x C67x DSPLIB Emulation
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Gagan Maur
    Posted by Gagan Maur
    on Mar 04 2009 11:18 AM
    Expert4435 points

    Robert, Sorry for the trouble! Let me suggest some quick debug steps:

    - Try disabling interrupts across the DSPF_sp_fir_gen call. You can do it using the HWI_disable/HWI_restore BIOS APIs. If that fixes the issue, it would imply the ASM kernel is not interrupt tolerant

    - Try using the C version of the kernel. If that doesn't show any issue, it would imply a bug in the ASM code.

    If the issue persists even after trying the above two, we will need to look closer at how you are using the API

    Gagan

    ----------------------------------------------------------------------------------------------------------
    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.
  • Robert9862
    Posted by Robert9862
    on Mar 04 2009 12:05 PM
    Intellectual310 points

    Gagan, Thank you for the suggestions.

    I will try them and report the results here.

    Regarding the C version of the code:
    In my oppinion, there is a little error in the listing on page 4-40 of SPRU657B. The outer loop should run from j=0 to j=nr-1 and the inner loop should run from i=0 to i=nh-1. So nr and nh are interchanged. Otherwise h[ i] in the inner loop will access a location outside h. Is the ASM code also implemented like this?

    So as a third step I will try to call the function with interchanged arguments...

    Robert

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Robert9862
    Posted by Robert9862
    on Mar 04 2009 15:44 PM
    Intellectual310 points

    Disabling the interrupts seems to be the solution!

    Up to now the program has been running for more than 1.5 hours without a problem.

    But doesn't "interrupt-tolerant but not interruptible" mean that the function disables the interrupts by itself? Is it a bug in DSPF_sp_fir_gen?

    Thank you very much for your help!

    Robert

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Gagan Maur
    Posted by Gagan Maur
    on Mar 04 2009 16:43 PM
    Expert4435 points

    Robert, If disabling interrupt across the kernel avoids the issue, I would count this as a bug in the kernel. I'm assuming for now the interrupt disable workaround is acceptable to you. We'll debug the code and update to fix the issue.

    Gagan

    ----------------------------------------------------------------------------------------------------------
    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.
  • Bhaskar Reddy
    Posted by Bhaskar Reddy
    on Jun 02 2009 00:40 AM
    Intellectual450 points

    Even latest library files from TI site, have this issue. Please correct it in ASM or give a mention of this in the user guide.

    Surprisingly, this issue is not there with other library functions such as FFT.

    Also, please change the C equilant for the functin DSPF_sp_fir_gen (page 4-40) in the user guide. There is an error in that code. nh and nr are interchanged.

    library filter DSPF_sp_fir_gen fir
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Gagan Maur
    Posted by Gagan Maur
    on Jun 02 2009 02:09 AM
    Expert4435 points

    Yes, 67x DSPLIB has this bug. The latest DSPLIB for 674x has this resolved: http://tiexpressdsp.com/index.php?title=C674x_DSPLIB

    Gagan

    ----------------------------------------------------------------------------------------------------------
    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.
  • Joe Coombs
    Posted by Joe Coombs
    on Jun 02 2009 10:10 AM
    Verified Answer
    Verified by clam
    Expert8845 points

    Please note that the 674x DSPLIB is built for the newer 674x DSP core (i.e. C674x and OMAP-L1x parts).  You can use the new library with older parts only if you rebuild it for the older 671x platform.  To do that:

    1. Open the dsplib674x.pjt project file in CCS
    2. Remove the source files DSPF_sp_fftSPxSP.asm and DSPF_sp_ifftSPxSP.asm from the project (these updated functions can't work with an older core)
    3. Go to the Project->Build Options screen
    4. Select "C671x" in the Target Version drop-down box under the Compiler tab
    5. Rebuild the project

    Rebuilding the new source for an older platform may hurt performance.  Also, the code will not be interruptible (but it's still interrupt tolerant).

     


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

     

    DSPLIB
    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 11:55 AM
    Prodigy210 points

    I have downloaded DSPLIB  (c674x) Release 3.1.0.0.

    In user guide documentation i find remark for DSPF_sp_fftSPXSP function:

    Implementation Notes:

    Interruptibility: The code is interrupt-tolerant but not interruptible. 

    What is it means for me?

    Can i use this routine in the background and simultaneously service interrupts from mcASP for capturing new data, for example?

    Thanks

    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