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.

DSK 6713 problems

I facing some problem I need your kind help.

1. Can u tell me whether it accepts -ve value of input voltage in the AIC23, & stores it as -ve value & displays it as -ve value while printf. Bcoz in the following code given below & its output dont have any -ve values while printing the sampled data.

2. The print in the while loop is non reliable sometimes it prints sometime does not print at all, some prints with step jump (i.e. missing printf in some loop). sample op is given below.

3. In this program if i restart or run it again it shows different unknown errors. Every time I need to reload the program & run it for successful operation.This should not happen.

CODE is given below: Note: dont worry  about the function & other declarations the function has been removed to take less area to paste it here. Only main has been given. If u ask I can provide u the full code. While running the Line was connected to PC & music file was being played. Program is designed to run continuously with while (1) ,but for debugging purpose code has been made for while(p<1000)

Thank You for getting around with it.

void main()

{

DSK6713_AIC23_CodecHandle hCodec;

Uint32 leftsample,rightsample;

int i=0,j=0,p=0;

double x[SIZE];

double y[SIZE];

double w[SIZE];

printf("******** N & SIZE %d %d ********\n",N-1,SIZE);

for(i=0;i<SIZE;i++)

{

x[i]=0;

y[i]=0;

 

}

i=0;

gen_w_r2(w, N); 

DSK6713_init();

hCodec = DSK6713_AIC23_openCodec(0, &config);

DSK6713_AIC23_setFreq(hCodec,DSK6713_AIC23_FREQ_8KHZ); 

 

while(p<1000)

{

 

while (!DSK6713_AIC23_read(hCodec,&leftsample)); /* Read a sample to the left channel */

while (!DSK6713_AIC23_read(hCodec,&rightsample)); 

  x[2*i]=leftsample;

       x[2*i+1]=0;

 

     while (!DSK6713_AIC23_write(hCodec,y[2*i])); /* Write a sample to the left channel */

while (!DSK6713_AIC23_write(hCodec,y[(2*i)+1]));

if(i==N-1)

{

for(j=0;j<SIZE;j++)

{

y[j]=x[j];

}

  

   printf("p = %d",p);

   DSPF_dp_icfftr2(N, y, w, 1);

                

  bit_rev(y, N);

                    

divide(y, N);

/*//for transmitter omitted part

DSPF_dp_cfftr2(N, y, w, 1);

bit_rev(y, N); */

                    

                    

               i=-1;

}

i++;p++;

}

// for debugging

for (j=0;j<32;j++)

{ printf("input %d  %f + %f ,",j+1,x[2*j],x[(2*j)+1]);

}

    /* Close the codec */

    DSK6713_AIC23_closeCodec(hCodec);

}

******** N & SIZE 31 64 ********
p = 31p = 63p = 95p = 127p = 159p = 191p = 223p = 255p = 287p = 319p = 351p = 383p = 415p = 447p = 479p = 511p = 543p = 575p = 607p = 639p = 671p = 703p = 735p = 767p = 799p = 831p = 863p = 895p = 927p = 959p = 991input 1  64588.000000 + 0.000000 ,input 2  65120.000000 + 0.000000 ,input 3  64551.000000 + 0.000000 ,input 4  64785.000000 + 0.000000 ,input 5  65384.000000 + 0.000000 ,input 6  64984.000000 + 0.000000 ,input 7  65006.000000 + 0.000000 ,input 8  65124.000000 + 0.000000 ,input 9  65260.000000 + 0.000000 ,input 10  65273.000000 + 0.000000 ,input 11  569.000000 + 0.000000 ,input 12  351.000000 + 0.000000 ,input 13  75.000000 + 0.000000 ,input 14  811.000000 + 0.000000 ,input 15  352.000000 + 0.000000 ,input 16  261.000000 + 0.000000 ,input 17  512.000000 + 0.000000 ,input 18  468.000000 + 0.000000 ,input 19  65493.000000 + 0.000000 ,input 20  488.000000 + 0.000000 ,input 21  65525.000000 + 0.000000 ,input 22  394.000000 + 0.000000 ,input 23  64956.000000 + 0.000000 ,input 24  64708.000000 + 0.000000 ,input 25  65365.000000 + 0.000000 ,input 26  64290.000000 + 0.000000 ,input 27  64220.000000 + 0.000000 ,input 28  65379.000000 + 0.000000 ,input 29  64468.000000 + 0.000000 ,input 30  64693.000000 + 0.000000 ,input 31  65287.000000 + 0.000000 ,input 32  64422.000000 + 0.000000 ,