This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

c66xx printf related issue

A part of my code is as shown below. I am using I'm using CCS V5.5, C6670 multi core processor to implement a filter function and run the following code.

int main(){

.....

filter_func(ORDER,af,h,NP,RxdPrembSeq);

.....

return 0;

}

...........The filter_func function is as shown below.......

void filter_func(int ord, float *af, float *h, int np, float complex *RxdPrembSeq)
{
int i,j;
float complex *filtered_signal;
filtered_signal[0]=h[0]*RxdPrembSeq[0];
for (i=1;i<ord+1;i++)

{
filtered_signal[i]=0.0;
for (j=0;j<i+1;j++)
filtered_signal[i]=filtered_signal[i]+h[j]*RxdPrembSeq[i-j];
for (j=0;j<i;j++)
filtered_signal[i]=filtered_signal[i]-af[j+1]*filtered_signal[i-j-1];
}
/* end of initial part */
for (i=ord+1;i<np+1;i++)
{
filtered_signal[i]=0.0;
for (j=0;j<ord+1;j++)
filtered_signal[i]=filtered_signal[i]+h[j]*RxdPrembSeq[i-j];
for (j=0;j<ord;j++)
filtered_signal[i]=filtered_signal[i]-af[j+1]*filtered_signal[i-j-1];
}
/*for(i=0;i<24576;i++)
{
printf("%f%+fi,",creal(filtered_signal[i]),cimag(filtered_signal[i]));
}*/
printf("\n");
}

When I print the filtered_signal it prints the expected values but when the printf("\n") statement is followed by few other instructions as shown below and then print the values of filtered_signal , it prints nannani...

void filter_func(int ord, float *af, float *h, int np, float complex *RxdPrembSeq)
{
int i,j;
float complex *filtered_signal;
filtered_signal[0]=h[0]*RxdPrembSeq[0];
for (i=1;i<ord+1;i++)

{
filtered_signal[i]=0.0;
for (j=0;j<i+1;j++)
filtered_signal[i]=filtered_signal[i]+h[j]*RxdPrembSeq[i-j];
for (j=0;j<i;j++)
filtered_signal[i]=filtered_signal[i]-af[j+1]*filtered_signal[i-j-1];
}
/* end of initial part */
for (i=ord+1;i<np+1;i++)
{
filtered_signal[i]=0.0;
for (j=0;j<ord+1;j++)
filtered_signal[i]=filtered_signal[i]+h[j]*RxdPrembSeq[i-j];
for (j=0;j<ord;j++)
filtered_signal[i]=filtered_signal[i]-af[j+1]*filtered_signal[i-j-1];
}
/*for(i=0;i<24576;i++)
{
printf("%f%+fi,",creal(filtered_signal[i]),cimag(filtered_signal[i]));
}*/
printf("\n");

j=0;

i=0;
do
{
x_decimated[j]=filtered_signal[i];
j=j+1;
i=i+12;
}while(i<24576);
for(i=0;i<2048;i++)
{
printf("%f%+fi,",creal(x_decimated[i]),cimag(x_decimated[i]));

..

........
}

What could be the possible error in this case? The program works fine until there are no instructions typed post filter_func printf statements. Kindly help me fix this issue.

Thanks in advance.