AnsweredAssumed Answered


Question asked by Wallaby on Jul 14, 2014
Latest reply on Jul 16, 2014 by fm

I am trying to do the FFT over an input real data (audio) on STM32F4 DISCO EVK & external CODEC. I have used the CMSIS function  arm_rfft_fast_f32()  
I have implemented the code similar to the found in this forum:

My simplified code:

float32_t In_Buffer[1024];
float32_t Out_Buffer[1024];

static arm_rfft_fast_instance_f32 s;

arm_rfft_fast_init_f32(&s, 1024);

arm_rfft_fast_f32(&s, In_buffer, Out_Buffer, 0);  

After the FFT execution even with ARM_MATH_SUCCESS flag ok I found NaN into several positions of the resulting array, and nonsense random floats *10^35, etc... 

May I need to scale the input? I tried to scale in different ways and i got the same NaN and positive and negative enormous random numbers, something overflows or I don't know. 

I have tried the Complex FFT functions padding the imaginary part with 0's and I got at least measurable float numbers. It seems that was correct but I can´t verify the spectrum yet.

In my previous measurements the real fast FFT was 3 or 4 faster than the complex one.
I need to transform a stereo audio sample as fast as possible and I need to use the real functions for each channel, another solution that I was found is the complex functions with R channel into the real part and L channel into the imaginary part, but I am not sure, I am not an FFT expert and may I am wrong...

Please, I need some help, someone knows these functions of CMSIS? there are few references of these real functions.  

Kind regards.