This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Question related with FFT

Hello, 

Now I'm testing FFT, but I think there's problem occured by the different Data Type.

The type of my recieved input signal(a counter up to 1024) is uint32_t, in the beginning I was using that "DSP_fft32x32" source code. but unfortunately there's NO output data. (to match with it, I used gen_twiddle_fft32x32). so now based on DSPF_fft_SPxSP modified my code. I stored all my input data into data[2*i], and set data[2*i +1]=0, my input data(32 bit int) is plotted correctly in the graph, just like sawtooth wave with zeros in the middle of 2 values, but when I transfered it into float(the data type needed in DSPF_fft_SPxSP), there came the problem. the figure seems like having a big distortion, at least the tendency of my values are totally different from the integer ones. 

I wanna ask, is this proper that I change the data type directly? for example, int32_t A; float B; B=(float)A;

if its not, how can I make it work? 

Thanks in advance

  • Hello Wendy ,

    I have directly not answer to your Question , I am try to run a DSP_fft32*32 on C6678 . I want to ask you :

    whichFiles are included into your Programm ? (location and Filename ). I am confused which the lots off Files inside the DspLib Directory

    Thank you for reply

    Lopez

  • Hi Lopez, 

    I was using the function called DSPF_sp_fftSPxSP which you could easily find under the directory of <...\ti\dsplib_c66x_3_1_0_0\packages\ti\dsplib\src> 

    as you could see from the function, you need to set your data as the type of float.

    and btw, I solved my old problem. its fine to cast integer directly to float. I just changed int32_t to uint32_t and it worked. because of the data was too large that it flowed.

    Regards,

    Wendy