Page 1 of 1

Unable to achieve 10k samples using ADC continuous mode example code for ESP32.

Posted: Tue Jun 04, 2024 7:59 am
by om_sal
Hi, I am working on a project where I need to get 10kHz sample rate i.e. 10,000 sample in 1 second on ADC pin using DMA in ESP32. I have tried this using ADC in continuous mode example code. But I am getting only 120-150 approx. samples in 1 second.
I need some help to solve this problem and how to validate the samples.
Thankyou.

Re: Unable to achieve 10k samples using ADC continuous mode example code for ESP32.

Posted: Wed Jun 05, 2024 8:47 pm
by FrankJensen
I run 40K samples without any problems. Are your buffers big enough?

Re: Unable to achieve 10k samples using ADC continuous mode example code for ESP32.

Posted: Wed Jun 05, 2024 8:57 pm
by mnentwig
Hi,

you could have a look at this code sample, below. It doesn't actually use the buffer contents but that part is straightforward (use bits 11..0 of the returned 16 bit data)
https://github.com/mnentwig/ESP32_ADCrate_dbg