I am working on a project where I have to compute FFT of a signal. Same signal is fed through both MATLAB and STM32 controller and results are compared.
Results seems to be different from each other. I don't know what I am doing wrong.
The STM32 Code is below.
//Pre-FFT
arm_fill_f32(0, &tempBuff_1[FrameLen], 256-(FrameLen)); //zero padding
PreFFTProcess(tempBuff_1, tempBuff_2, 256); //Convert format from Real[0],Real[1],Real[2],Real[3].. to Real[0],Img[0],Real[1],Img[1]...
//FFT
arm_cfft_f32(&fftInstance, tempBuff_2 , 0, 1); //FFT
arm_cmplx_mag_f32(tempBuff_2, tempBuff_1, 256); //ABS
The MATLAB code: Out = abs(fft(Input,256));
The results:
MATLAB vs STM32 FFT Result1
MATLAB vs STM32 FFT Result2