cancel
Showing results for 
Search instead for 
Did you mean: 

Hi I tested arm_rfft_fast_f32 function from CMSIS-DSP 1.4.5. i want to calculate frequency. whenver i am use arm_cmplx_mag_f32((float32_t *) FFT_Input_Array_1, FFT_Output_Array, Samples); this function given not proper calculate fft Result.

Svish.3
Associate

Hi I tested arm_rfft_fast_f32 function from CMSIS-DSP 1.4.5 

i used external 16 bit adc to given input of the stm32f4 devlopment board using SPI DMA interface. This row count data from adc given to the input buffer that are given below

My Problem is that whenever i calculate magnitude using arm_cmplx_mag_f32(); the result of FFT_Output_Array all are zero. 

so where am i wrong ??

Thank in Advance

#define  Buf_Length  2048

#define  Samples    Buf_Length/2

 arm_rfft_fast_init_f32(&fft_handler, Buf_Length);

for(uint16_t i=0;i<=(Buf_Length/2);i++)

{

  FFT_Input_Array[i*2]=Rx_DMA_Byte_Array[i];    //Real Part Data

  FFT_Input_Array[(i*2)+1]=0;                 //imaginary data

}

arm_rfft_fast_f32(&fft_handler, (float32_t *)FFT_Input_Array,(float32_t *)FFT_Input_Array_1,1);

arm_cmplx_mag_f32((float32_t *) FFT_Input_Array_1, FFT_Output_Array, Samples);

arm_max_f32(&FFT_Output_Array[1],(uint32_t)(Samples),&Max_Frequency,&Max_Frequency_Index);

0 REPLIES 0