This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problem with arm_cmplx_mag_f32()

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);

Top replies

Parents Reply Children