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.
I am currently testing the FFT code from the DSPLib example, transform_ex1_fft_fixed_q15.c
My problem is that LEA enabled result (calculated by LEA) is notably different from the LEA disabled one (where the software library kicks in)
I calculated the magnitude of the FFT result by Re(x)^2 + Im(x)^2 and plotted the result
This is a result from LEA enabled. I think it makes sense because It should have one peak at 200 and one at 2100.
Since FS=8192, I assume the result shows from 0 ~ omega/2 (4096), and the middle peak is 2100 (though not sure why the peak is fluctuating..)
Anyway, my concern is this plot. When I disable LEA, the calculation uses the SW library. and the result is notably different, showing high peak at the right. (around 4096Hz?)
Is this some fundamental limitation the software implementation has? Or am I doing something wrong?
Since I don't know what should be the result of the example, I am not even sure if the first plot is correct,
and even more lost about the second result.
Anyway all I did was flip the flag to not use lea...
Thank you!
Hi, thanks for the reply. From your comment I got a hint that the code itself might not be a problem, and was able to find a solution.
I was not including <math.h> in my code, and I am not sure exactly what happened (my thought is that my mspgcc compiler added its math lib instead of TI math lib),
but it anyway was the problem.
Including <math.h> explicitly solved the problem.
Thank you!
**Attention** This is a public forum