FFT in real time

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

cross mob
lock attach
Attachments are accessible only for community members.
DaKa_4649221
Level 1
Level 1

Hi everyone,

I am currently facing a problem on making fft works using CMSIS DSP library. Basically, I want to convert real time data from my sensor into frequency data by using FFT CMSIS DSP library. However, it only works for the first loop. I debug the code and somehow the program is still running after the first loop but i cannot find the location of the code where the program is running after first loop (Step Over). Does the FFT messed up the memory location of every function in the program or i cannot call the FFT function more than one time? Thank you.

0 Likes
1 Solution

Hi Ganesha,

I managed to fix my project and get the result FFT in real time. Basically, i changed my input data type into float so that i can use arm_cfft_f32 function.

1. I already removed fix_ftt.h since im not using it anymore. For arm_const_structs.h, I download CMSIS library and include in the build setting. You can refer to this link https://www.cypress.com/comment/300971

2. Thank you for your suggestion, i already removed it. I called it only one this time.

3. I'm fairly new to PSoC thus i refer to this video from youtube for I2C communication. PSoC4 I2C & UART Tutorial: Reading Over I2C - YouTube

4. Since i managed to get the result what i want, thus it is unnecessary to remove it.

Thanks for your help.

Darwish

View solution in original post

0 Likes
2 Replies
lock attach
Attachments are accessible only for community members.
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi,

1. We are getting build errors with your project "arm_const_structs.h" and "fix_fft.h" are not available in the project. Can you please fix these errors and send the project again? Also, can you please tell us the steps to reproduce the issue?

2. You are calling I2C_1_Start() in the for loop. Ideally I2C component should be started only once and that is during initialization. Can you please remove this line and test once?

3. In the ADXL345_ReadReg() function you are Writing through the I2C as well as reading through the I2C. Can you please tell us the reason for this?

4. For now, can you please remove the I2C part from your application and check only the FFT part?

5. Please have a look at the attached code example which uses and includes the CMSIS DSP library, this library has many mathematical functions, FFT , filters , statistical functions , all optimized for ARM Cortex M0.

Thanks

Ganesh

Hi Ganesha,

I managed to fix my project and get the result FFT in real time. Basically, i changed my input data type into float so that i can use arm_cfft_f32 function.

1. I already removed fix_ftt.h since im not using it anymore. For arm_const_structs.h, I download CMSIS library and include in the build setting. You can refer to this link https://www.cypress.com/comment/300971

2. Thank you for your suggestion, i already removed it. I called it only one this time.

3. I'm fairly new to PSoC thus i refer to this video from youtube for I2C communication. PSoC4 I2C & UART Tutorial: Reading Over I2C - YouTube

4. Since i managed to get the result what i want, thus it is unnecessary to remove it.

Thanks for your help.

Darwish

0 Likes