Update:
I have highlighted the offending loop. Also, N is the power of 2 that
equals the number of samples that the FFT is being performed upon. Anything
below N=9 and the program sends, i.e. for upto 256 samples. I was hoping to
implement this for 1024 samples. Any idea what might be causing it to crash
when N is increased beyond 8?
*
******************************************************************************************
int I,I0,I1,I2,I3,I4,I5,I6,I7,I8, IS,ID;
int J,K,M,N2,N4,N8;
float A,A3,CC1,SS1,CC3,SS3,E,R1,XT;
float T1,T2,T3,T4,T5,T6;
call Leds.led0On();
M=(int)(log(N)/log(2.0)); /* N=2^M */
/* ----Digit reverse counter--------------------------------------------- */
J = 1;
for(I=1;I<N;I++)
{
if (I<J)
{
XT = X[J];
X[J] = X[I];
X[I] = XT;
}
K = N/2;
while(K<J) /*Offending Loop Start
{ *
J = J - K; *
K = K/2; *
} *Offending Loop End*/
J = J+K;
}
******************************************************************************************
*
Thanks, in advance.
Regards,
Kushal
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help