CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug Reports on this forum. Send them to support@ccsinfo.com

FFT_LENGTH and FFT.h

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
pfournier



Joined: 30 Sep 2003
Posts: 89

View user's profile Send private message

FFT_LENGTH and FFT.h
PostPosted: Fri Apr 27, 2018 9:38 am     Reply with quote

In FFT.h (Using compiler 5.076 on the DSP Analog Demo Kit.)

There is this line:

#error FFT LENGTH must be a power of two and not more than 512!

I am curious as to the limitation for not being able to do 1024 or 2048.

I was able to compile and run 1024 (pushing the limit on memory), but the output was missing a freq peak (expecting 2 freq peaks which I get on 512 and lower). So while I will trust that it does not work, I am kind of hoping that someone can tell me if it is beyond hope or what is the source of the limitation?
_________________
-Pete
newguy



Joined: 24 Jun 2004
Posts: 1497
Location: Edmonton, Alberta

View user's profile Send private message

PostPosted: Fri Apr 27, 2018 11:15 am     Reply with quote

I don't know the precise reason as I've never used the FFT functionality, but perhaps it's to prevent an overflow of a variable(s)?
Ttelmah



Joined: 11 Mar 2010
Posts: 13260

View user's profile Send private message

PostPosted: Mon Apr 30, 2018 3:58 am     Reply with quote

Historically in the old version of this code they put the xdata array at 0x800. Positioned here this limits the maximum supported number of points to 1024. Latter include files have this relocated to 0x1000 which should support up to 2048 points, but the validity test from the older code was not updated. With enough RAM, the code ought to accept your 1024 entries, if you add this to the error test. With the right values it ought to work.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group