AnsweredAssumed Answered

error on taking fft of output of ADC

Question asked by alvin012345 on Jan 13, 2010
Latest reply on Feb 12, 2010 by TomA



I modified the Process_Data of the sample audio codec talkthrough to take the output of the ADC to be inputted to the rfft...

here's my modification


#include "Talkthrough.h"


// Function:    Process_Data()                                                //
//                                                                            //
// Description: This function is called from inside the SPORT0 ISR every     //
//                time a complete audio frame has been received. The new         //
//                input samples can be found in the variables iChannel0LeftIn,//
//                iChannel0RightIn, iChannel1LeftIn and iChannel1RightIn         //
//                respectively. The processed    data should be stored in         //
//                iChannel0LeftOut, iChannel0RightOut, iChannel1LeftOut,        //
//                iChannel1RightOut, iChannel2LeftOut and    iChannel2RightOut    //
//                respectively.                                                //

void Process_Data(void)

    int wst = 1;
   int n = NUMPOINTS;
   int block_exponent = 0;
    int scale_method = 0;
    //init twids
    twidfft_fr16 (w, NUMPOINTS);
    input_arr = iChannel0LeftIn;
    rfft_fr16 (input_arr, t, out, w, wst, n, block_exponent, scale_method);
   //iChannel0LeftOut = iChannel0LeftIn;
    //iChannel0RightOut = iChannel0RightIn;


I'm receiving this error

         expression must be a modifiable lvalue
  input_arr = iChannel0LeftIn;

or when i make my iChannel0LeftIn as my lvalue i have a linker error


[Error li1021]  The following symbols referenced in processor 'p0' could not be resolved:
        'input_arr [_input_arr]' referenced from '.\Debug\Process_data.doj'
        'out [_out]' referenced from '.\Debug\Process_data.doj'
        't [_t]' referenced from '.\Debug\Process_data.doj'
        'w [_w]' referenced from '.\Debug\Process_data.doj'


Linker finished with 1 error
cc3089: fatal error: Link failed





What do I need to change in the sample audio codec talkthrough in order to take in the output of the ADC to the input_arr of the rfft?




Thanks in advance