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?
~5us ADC read using ESP32-S3
Re: ~5us ADC read using ESP32-S3
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.
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.
-
MicroController
- Posts: 2669
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: ~5us ADC read using ESP32-S3
Why would you try and do one-shot in this case?at least 200kHz sampling rate.
Utilizing only ADC1, with Oneshot mode driver, ...
Who is online
Users browsing this forum: GPTBot, meta-externalagent, Nerez83, Perplexity-User, Semrush [Bot], YisouSpider and 0 guests