AnsweredAssumed Answered

How to use ARM_MATH FFT

Question asked by on Apr 20, 2017
Latest reply on Apr 20, 2017 by AvaTar

Dear Community,

I want to use the arm package: arm_cfft_radix4 to perform a 1K FFT repetitively in a loop on a STM32F407 device. To do so I predefined: __FPU_PRESENT=1,ARM_MATH_CM4 and added the library arm_cortexM4lf_math.lib to my project.

For investigating the arm_fft I copied testcode from:


#define FFT_SIZE 1024

arm_cfft_radix4_instance_f32 S;

//get some test data:

for (count = 0; count < FFT_SIZE; count ++) {

                        Input[count] = 10* arm_sin_f32(count*PI_loc/ 10);     


arm_cfft_radix4_init_f32(&S, FFT_SIZE, 0, 1);

// execute the fft repetit

while(1) {                                         

                       // Process the data through the CFFT/CIFFT module

                        arm_cfft_radix4_f32(&S, Input);      

                        // Process the data through the Complex Magniture Module for calculating the magnitude at each bin

                        arm_cmplx_mag_f32(Input, Output, FFT_SIZE);


                        -> SEND Output to Display


However it works just for one times – during all subsequent cycles Output contains nothing. I would be very happy if someone would give a hint.