2013-08-09 01:42 AM
I'm using the ''arm_cfft_radix4_f32(&S, FFTData); '' function to obtain the FFT of an array and then inverse it back after some processing.
I have things working, to a point, but with some odd restrictions. Firstly I want to do a 512 point FFT, but changing the size to 512 causes all my outputs to become zero. I can only get it to work for the size of 256. I'm assuming that its failing because I'm giving it inputs of the wrong size, but I feel they 'should' be corret. I'm feeding the function an array of size 1024, with 512 real values and 512 complex values set as zero. Arranged as Real1[0] Imag1[1] Real2[2] Imag2[3]..... From the somewhat unhelpfull CMIS documentation, it appears that I need to be giving the function an array double the size of the fft size I want. 1024 = 2*512, so shouldn't that be correct? Using the exact same input array, but changing the fft size to 256 does indeed give me a working FFT, however only half of the output array is filled, the extra 512 points remain untouched. Am I missing something here? Cheers, Will Addition: Looking closer using the debugger, If I set the size to 512 the program just halts when it reaches the FFT function, ang goes no further. :S2013-08-09 01:57 AM
This sounds something like type limit probably inside function where something uses byte value to move around the array. Can you check if that is not the case?
2013-08-09 02:08 AM
Thanks for the reply, I don't quite understand what you mean though.
How should I check for this?2013-08-09 02:40 AM
Did you call the
arm_cfft_radix4_init_f32()
function before with a proper size value ?2013-08-09 03:22 AM
Yes, I'm initiating it as I believe I should be -
status = ARM_MATH_SUCCESS;
/* Initialize the CFFT/CIFFT module */
status = arm_cfft_radix4_init_f32(&S, fftSize, ifftFlag, doBitReverse);
//FFT
arm_cfft_radix4_f32(&S, FFTData);
2013-08-09 04:40 AM
Yes, I'm initiating it as I believe I should be -
Believing might be not enough ... It works for me with 1024 points - there shouldn't be a problem with 512 points. Is your
fftSize
variable really 512 ?2013-08-09 04:50 AM
Yes, definately. Leaving it as 256 works but simply changing it to 512 does not. Am I correct to be giving it an array of [1024] with 512 of both real and imaginary numbers?
2013-08-09 05:45 AM
What type is fftSize (aka. how did you define it)? What is is byte, short unsigned int? Next thing is to check with debugger what are numbers in variables before you enter this function.
2013-08-09 06:33 AM
I just tried doubling again all my array sizes, to try for a 1024 size FFT. I wasn't expect it, but it works. This makes it even more confusing that I still cant get a 512 FFT to work.
2013-08-12 01:14 AM
Rumor has it that radix-4 FFT only works with
16, 64, 256, 1024 sizes.