Page 1 of 1

~5us ADC read using ESP32-S3

Posted: Thu Apr 10, 2025 12:49 am
by litmus337
Hi,
I'm trying to do some very fast ADC sampling with at least 200kHz sampling rate.
Utilizing only ADC1, with Oneshot mode driver, I was able to obtain analog data in ~30 us. With Continuous mode driver, using very small conversion frame size, it was feasible but super unsteady; when I do some hard work analyzing ADC data it often paniks. Even some data was corrupted and not usable.
So, to achieve very fast sampling, what should I do? my next approach is to access the ADC peripheral directly, is it valid? If valid how can I do that?

Re: ~5us ADC read using ESP32-S3

Posted: Thu Apr 10, 2025 9:34 am
by alb702
A first cause of this - is bad decision in ESP32 hardware: control two ADCs through one peripherial register. To prevent
acces to register from several tasks need to use syncronization objects: semaphores, spinlocks, etc... Therefore oneshot read
function have long execution time.
If in Your project used only ADC1 (warning: ADC2 used by Wifi) is possible to make more fast i/o-registers-based ADC driver.

Re: ~5us ADC read using ESP32-S3

Posted: Fri Apr 11, 2025 6:17 pm
by MicroController
at least 200kHz sampling rate.
Utilizing only ADC1, with Oneshot mode driver, ...
Why would you try and do one-shot in this case?