adc1_get_raw(ADC1_CHANNEL_0) tooks 42 microseconds.
analogRead(ADC1_CHANNEL_0) tooks 80 microseconds.
There are a bug in Espressif files and analogSetClockDiv(clockDiv)
and adc_set_clk_div(clockDiv) doesn’t work . The clock is fixed unfortunatelly.
Search found 2 matches
- Wed Sep 21, 2022 12:27 am
- Forum: ESP32 Arduino
- Topic: Real ADC max sample rate?
- Replies: 1
- Views: 6768
- Wed Sep 21, 2022 12:13 am
- Forum: ESP32 Arduino
- Topic: Bug in adc_set_clk_div() : Clock for adc1 is fixed
- Replies: 1
- Views: 1877
Bug in adc_set_clk_div() : Clock for adc1 is fixed
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 wor...