Hi,
Referring to given below post, I implement 1024 points FFT for real time sine wave using FFT Code given by Brad Griffis (TI guy). I have some confusion about length of Data and Twiddles factors.
http://e2e.ti.com/support/dsp/tms320c6000_high_performance_dsps/f/115/p/12340/48185.aspx#48185
In my program, I defined them following way.
#define BUFFSIZE 1024 // No. of FFT Points
#pragma DATA_ALIGN(fft_buffer, 8)
float fft_buffer[2*BUFFSIZE]; // FFT input
#pragma DATA_ALIGN(twiddles, 8)
float twiddles[BUFFSIZE]; // twiddle factors
short bitrev_table[BUFFSIZE];
Here I am converting input samples into complex pair before applying FFT function
for(k=0; k < 2*BUFFSIZE; k++)
{
fft_buffer[2*k] = (float)gBufferRcvPing[k];
fft_buffer[2*k+1] = 0.0;
}
then calling FFT function as given in Brad's folder.
fft_r2(fft_buffer, twiddles, BUFFSIZE, bitrev_table);
The size of fft_buffer is 2*BUFFSIZE and I am performing 1024 point FFT.
Am I using the right way to calculate FFT ?
I don't know whether I should transform input signal into complex pair before computing FFT or not ?
Should the length of twiddle factor be same as of no. of FFT points (BUFFSIZE) or fft_buffer [2*BUFFSIZE] ?
Please help me correcting my confusion.
Thanks and Regards.