
1. Re: PSoC 6 Incorrect FFT Output
shRe_2888731 Mar 20, 2019 11:48 AM (in response to user_56067)First make sure you are getting the desired data from the ADC. You can check out the example ADC project CE220974 which I am guessing you already have.
For FFT, I would recommend using the real FFT function since your data set is real and the function is computationally faster. Here is how I would do it:arm_rfft_fast_instance_f32 S;
1 arm_rfft_fast_init_f32(&S, N_SAMPLES); /* make sure the N_SAMPLES is a power of 2 and greater or equal to 32 */
2 arm_rfft_fast_f32(&S, adc_in, adc_in, FALSE); /* both source and destination array can be the same since the FFT functions operate inplace */
3 arm_cmplx_mag_f32(adc_in, FFT_output, HALF_N_SAMPLES); /* FFT_output array would be half the size of the adc_in array since it is all real4 find your peak from the FFT_output
Now you could also use the complex FFT but the input array would then have to have alternate real and complex values as mentioned at Complex FFT Functions and shown below
Let me know if this helps.

2. Re: PSoC 6 Incorrect FFT Output
shRe_2888731 Mar 20, 2019 11:53 AM (in response to shRe_2888731)EDIT: So if using complex FFT function, you will have to put zeros in between your real values since your complex component of the data set is zero.