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.

Compiler/LAUNCHXL-CC2640R2: adcbufcontinuous

Part Number: LAUNCHXL-CC2640R2

Tool/software: TI C/C++ Compiler

Hello , 

i am just trying to adjust adcbufcontinuous example to oneShot , and using arm_rfft_fast_init_f32 to get Real FFT

it works very well with (ADCBUFFERSIZE=512)

but it dose not works at all with (ADCBUFFERSIZE=1024), 

there is no error but only a warning ( No ThreadX RTOS Detected), and nothing happens

can someone tell me what is the problem please

here is my code :

__________________________

#include <ti/drivers/ADCBuf.h>

ADCBuf_Handle adcBuf;
ADCBuf_Conversion oneShotConversion;

///////////////////

#include <arm_math.h>

#define ADCBUFFERSIZE 1024
float S1[ADCBUFFERSIZE];
float S2[ADCBUFFERSIZE];
arm_rfft_fast_instance_f32 S;

//////////////

// in meanthread//

ADCBuf_Params adcBufParams;

/* Set up an ADCBuf peripheral in ADCBuf_RECURRENCE_MODE_CONTINUOUS */
ADCBuf_Params_init(&adcBufParams);
adcBufParams.callbackFxn = adcBufCallback;
adcBufParams.recurrenceMode = ADCBuf_RECURRENCE_MODE_ONE_SHOT ;
adcBufParams.returnMode = ADCBuf_RETURN_MODE_CALLBACK;
adcBufParams.samplingFrequency = ADCBUFFERSIZE;
adcBuf = ADCBuf_open(Board_ADCBUF0, &adcBufParams);

/* Configure the conversion struct */
oneShotConversion.arg = NULL;
oneShotConversion.adcChannel = Board_ADCBUF0CHANNEL0;
oneShotConversion.sampleBuffer = sampleBufferOne;
oneShotConversion.sampleBufferTwo = NULL;//sampleBufferTwo;
oneShotConversion.samplesRequestedCount = ADCBUFFERSIZE;

arm_rfft_fast_init_f32( & S,ADCBUFFERSIZE) ;

if (ADCBuf_convert(adcBuf, &oneShotConversion, 1) !=ADCBuf_STATUS_SUCCESS)

{while(1);}

/////////////// adcBufCallback

void adcBufCallback(ADCBuf_Handle handle, ADCBuf_Conversion *conversion, void *completedADCBuffer, uint32_t completedChannel)
{
     /* Adjust raw ADC values and convert them to microvolts */
    ADCBuf_adjustRawValues(handle, completedADCBuffer, ADCBUFFERSIZE,completedChannel);

}

////////////////in processing Task (after adcBufCallback)

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

     S1[i]=(float)sampleBufferOne[i];

arm_rfft_fast_f32(&S,S1,S2,0);
print_Array_f(S2,ADCBUFFERSIZE,"\n\rifft");