FFT problem
I'm trying to calculate FFT of this signal (using Keil uVision and STM32F103VB:

but the result looks like this:

Here's the code:
/////////////////////////////////////////////////////////////////
const int N=256;
void fft(){
int i;
uint16_t real[N], imag[N];
for(i=0; i<N; i++){
real[i]=(uint16_t)(data[i]);
imag[i]=0;
x[i] = (((uint16_t)(real[i])) | ((uint32_t)(imag[i]<<16)));
}
cr4_fft_256_stm32(y, x, N);
}
/////////////////////////////////////////////////////////////////
data is a float array containing the sine signal. Pictures above shows x and y arrays.
Could anyone tell me what I'm doing wrong?
Please help.