How to implement FFT on the PSoC5?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Any advice,examples or solutions can be helpful. 🙂

   

thanks.

0 Likes
11 Replies
Anonymous
Not applicable
0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

There are a number of different algorithms with different properties,

   

performance.

   

 

   

en.wikipedia.org/wiki/Category:FFT_algorithms

   

en.wikipedia.org/wiki/Fast_Fourier_transform

   

 

   

This ap note is PSOC 1, should be able to easily port to PSOC 3/4/5.

   

Note PSOC 4 has a full 32 x 32 multiplier single cycle MAC in it, an

   

important advantage in demanding applications.

   

 

   

www.google.com/url    AN42877

   

 

   

If you are doing tone detection, Goertzel algorithm maybe one of the

   

best.

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

PSoC73,

   

Hi, I just read http://www.cypress.com/?app=forum&id=4749&rID=82225 

   

But I cannot open that PSoC4 project 😞

   

BTW, have you completed the FFT design on PSoC5?

   

Regards,PhilQ.

0 Likes
Anonymous
Not applicable
        Hi PhilQ-san,   
What version of Creator did you use?   
I'm using of course 2.2 SP1, that has no problem, build was succeed.   
You can change PSoC4 to PSoC5 by using Project/Device Selector...   
FFT does not using hardware register, just only a user program.   
Easy to porting into PSoC5, as you know.   
0 Likes
Anonymous
Not applicable

 ARM provides the DSP library for all the microcontrollers with ARM core. The DSP library is developed by some vendor for ARM.

   

This library can be used with PSoC 5LP. I haven't tried it but I have just heard of it. By the way anyone in the forum have used it?

0 Likes
Anonymous
Not applicable

I have just built it with the version of Creator 2.1

   

but it was not successful.

   

There are some errors:

   

".\Generated_Source\PSoC4\CyFlash.c:64: error: 'CYREG_CPUSS_SYSARG' undeclared (first use in this function)

   

 .\Generated_Source\PSoC4\CyFlash.c:78: error: 'CYREG_CPUSS_SYSREQ' undeclared (first use in this function)

   

 .\Generated_Source\PSoC4\CyFlash.c:123: error: 'CYREG_CLK_IMO_CONFIG' undeclared (first use in this function)

   

 .\Generated_Source\PSoC4\CyFlash.c:178: error: 'CYREG_CLK_SELECT' undeclared (first use in this function)

   

 The command 'arm-none-eabi-gcc.exe' failed with exit code '1'. "

   

By the way, how to transfer the data from ADC as the input samples to FFT?

0 Likes
Anonymous
Not applicable

 Dana,

   

 

   

There is a zip file  about implementing AN42877. But I cannot find something like the workspace file for creator in it.

   

 

   

I'm sorry that I have never used PSoC1 before.

   

 

   

How could I modify this PSoC1 example to apply to PSoC5?

   

 

   

Regards, PhilQ

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Sorry, Chrome didn't work, I have to upload it with IE.

   

Here is the attachment.

   

Thanks for your help 🙂

0 Likes
Anonymous
Not applicable

Hi Phil, i am trying to use the fft function contained in this file zip in order to compute the Fourier Transform of a sampled signal. Could you explain me how to interpret the output vector "mod"? I am not able to understand what is the frequency related to the i-th element of this vector. Is mod[0] the amplitude related to the DC component? And mod?

   

thank you in advance

0 Likes
Anonymous
Not applicable
        You have to upgrade Creator to the 2.2 SP1.   
That is a most fast way to do.   
   
The project just only contain 64points FFT calculation routine, Not include ADC.   
Sampling rate will depending upon your ADC design.   
64 is a simply design value, could be increase it, it's not difficult.   
0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

AN42877, seems to be no project file for PSOC Designer. You might try

   

contacting one of the authors, Nicola, I found his email in a paper he

   

authored -

   

 

   

www.piaggio.ing.unipi.it/sites/default/files/haptics-WHC07.pdf

   

 

   

If you can get source consider posting it for rest of forum users.

   

 

   

As for FFT, basically it is an operation/transform on a sample set. So using

   

the A/D you collect an array of samples, and pass that to FFT. Usually one

   

would use a continuous A/D, storing samples, in a circular array and keep

   

calling FFT each time a new sample added, old sample destroyed. However,

   

if time to compute FFT >> time to sample (usually the case), then use a ping

   

pong array setup, first fill up one array, then pass it to FFT while filling up a

   

second array, and repeat.

   

 

   

Regards, Dana.

0 Likes