I'm currently trying to use the ARM CMSIS DSP library on my cortex m3 PSoC 5lp chip.
I ran into some issues using some of the functions and I have a question about using the functions arm_cfft_q15 (or any of the arm_cfft_*** functions).
Say I have
q15_t ADC_samples[1024];
q15_t MAG_of_fft[1024];
and I run
arm_cfft_q15(1024pt_fft, ADC_samples, sample_length);
this does the transforms 'in place'. Now because of that, since the FFT returns both real and imaginary values, it will in fact only be able to return an fft of length 512 or is it 512 of the 1024 FFT samples? After getting the FFT I do
arm_cmplx_mag_q15(ADC_samples, MAG_of_fft, fftlength);
where fftlength is 1024.
This returns MAG_of_fft and when I plot it, it does indeed seem to be the shape that I am expecting to see but I do not know exactly how to interpret the results since I don't know how long my FFT is exactly. I am telling it I am doing a 1024pt FFT but it seems to be only returning a 512pt FFT, or only half of the 1024pt FFT, one or the other.
So am I getting this right? This means that the ADC_samples array must be twice as long as the data in it order for me to get a 1024 pt FFT? and then I can calculate the magnitude of the FFT using that 2048 array by telling it the length of the FFT is 1024?
Can someone explain to me how to properly interpret these functions and what length FFT I should expect?