I use ESP32 board in the Arduino IDE.
I try to sample channels using ADC1. Need fast analog to digital conversion inside a timer interrupt routine.
First, i have used Arduino's analogRead() function. This takes about 80 microseconds per conversion.
Then, i used adc1_get_raw(ADC1_CHANNEL_0). This work a bit faster, 42 microseconds.
Then, when try to use analogSetClockDiv(clockDiv) or adc_set_clk_div(clockDiv) nothing changes, the conversion takes the same time.
No matter what value clockDiv has.
I think is a bug in Espressif files .
Maybe someone can tell me how to change the clock of the analog to digital converter. Maybe setting processor's registers directly.
Thanks in advance!
Bug in adc_set_clk_div() : Clock for adc1 is fixed
Re: Bug in adc_set_clk_div() : Clock for adc1 is fixed
i believe it is partly related to the dma, try this https://github.com/espressif/esp-idf/tr ... _read/main
Who is online
Users browsing this forum: Google [Bot] and 32 guests