Code has problems. Refer to this repo: https://os.mbed.com/users/igorsk/code/FFT/

Dependencies:   mbed

Revision:
0:be659bc4df49
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Dec 05 08:11:10 2017 +0000
@@ -0,0 +1,33 @@
+#include "mbed.h"
+#include <SerialBase.h>
+
+Timer timer_slow;
+Timer timer_med;
+Timer timer_fast;
+
+Serial pc(USBTX, USBRX); // tx, rx
+
+AnalogOut aout(p18);
+
+void fftR4(short *y, short *x, int N);
+
+short x[512]; // input data 16 bit, 4 byte aligned  x0r,x0i,x1r,x1i,....
+short y[512]; // output data 16 bit,4 byte aligned  y0r,y0i,y1r,y1i,....
+short z[512]; // same format...
+
+int main()
+{
+    for (i=0;i<512;i++)
+    {
+        x[i]=0;
+    }
+    for (i=0;i<512;i=i+8)
+    {
+        x[i+0]=16384;
+        x[i+2]=16384;
+        x[i+4]=-16384;
+        x[i+6]=-16384;
+    }
+    
+    fftR4(y, x, 256);
+}
\ No newline at end of file