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.

CC2640R2F: Read ADC Faster

Part Number: CC2640R2F

Hi . I read adc by using ADCBUF Driver with One Shot Method but  every simple take 2.5 ms and this slow for me .I saw 200 000 sample /sec In datasheet . how can read faster than adcbuf driver ?

  // CC2640r2f adc init
  
  ADCBuf_Params_init(&adcparams);
  adcparams.returnMode = ADCBuf_RETURN_MODE_BLOCKING;
  adcparams.recurrenceMode = ADCBuf_RECURRENCE_MODE_ONE_SHOT;
  adcBuf = ADCBuf_open(Board_ADCBUF0, &adcparams);


  conversion.samplesRequestedCount = 200;
  conversion.sampleBuffer = sampleBuffer1;
  conversion.adcChannel = 1;

  • Hello Vahid Javadi,

    How are you? Looking at your code snippet it seems your sample rate is set to 200 Hz (conversion.samplesRequestedCount = 200;). Following the "adcbufcontinuous_CC2640R2_launchxl_tritos_ccs" project, look at the README here for more info about using the adcbuf. Try to change line 9 to a value other than 200 (Hz), or to a target value that you want, and see if that fixes your problem. For further assistance please provide:

    -Your SDK

    -Example project if applicable

    -CCS version

    Thanks,
    Alex F

  • Thank you Alex .Yes you are right my simple rate was wrong . after add  adcparams.samplingFrequency = 200000 i can read more sensetive adc 

      ADCBuf_Params_init(&adcparams);
      adcparams.returnMode = ADCBuf_RETURN_MODE_BLOCKING;
      adcparams.recurrenceMode = ADCBuf_RECURRENCE_MODE_ONE_SHOT;
      adcparams.samplingFrequency = 200000;
      adcBuf = ADCBuf_open(Board_ADCBUF0, &adcparams);
    
    
      conversion.samplesRequestedCount = 500;
      conversion.sampleBuffer = sampleBuffer1;
      conversion.adcChannel = 1;