cancel
Showing results for 
Search instead for 
Did you mean: 

FFT produces strange result

sarling
Associate II
Posted on July 09, 2009 at 11:13

FFT produces strange result

3 REPLIES 3
sarling
Associate II
Posted on May 17, 2011 at 13:16

Hello,

I'm using the cr4_fft_64_stm32 function in the dsplib, but gets some unexpected result. I have tried using a simple sine function to understand the problem:

Code:

<BR>u32 out2[SMPL], out3[SMPL], val; <BR>... <BR>val = (u32) (sin (8*PI*i/SMPL)*500 + 1500); <BR>out2[i] = (((u16)(val)) | ((u32)(0<<16))); <BR>... <BR>cr4_fft_256_stm32(out3, out2, SMPL); <BR>

where SMPL =

When I print the the input and output values it looks like this:

http://home.aland.net/masa/fft.jpg

Any ideas?

Kind regards,

Sarling

[ This message was edited by: sarling on 08-07-2009 18:19 ]

sarling
Associate II
Posted on May 17, 2011 at 13:16

I guess you need to zero out the imag. part, but it still looks about the same.

Code:

for (i = 0; i < SMPL; i++) {

out3[i] &= 0x0000FFFF;

}

sarling
Associate II
Posted on May 17, 2011 at 13:16

Anyone?