Indeed the original code has several mistakes. I attach a corrected 16-bit version with quite some modifications.
Interesting to note that as soon as we get to stage 3 and above, the code is basically similar, except for several loop values, etc. This is due to the symmetricity of the calculation (I had drawn my own butterfly diagram to see this myself!). I think it could be easily scalable to more than 128, but for a device with limited memory, that's a different story.
Hello! What changes should be done if I have input as float or double?
Thanks in advance.
I am getting results for integers but not for floating point. Can u suggest changes for floating point?
U can use complex numbers directly to calculate fft. But for psoc 4, this could be done only for 16 point fft due to memory issues.
That all is very good of course, but no resources stayed for something usefull.
Here is my adaptation of arduino fix_fft lib for arm. It requires very low resources and works fine.
Use two arrays:
int8 data; //input data
fix_fft(data, im, 7, 0);
results also in these arrays.