espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
12.56k stars 7.01k forks source link

how to use esp32s2' adc to sample from 2 channel with different frequency? (IDFGH-12676) #13667

Open Jeeeeeiel opened 3 weeks ago

Jeeeeeiel commented 3 weeks ago

Answers checklist.

General issue report

hello everyone.I'm now using idf5.1 in a project to sample two input voltages through adc continuous mode.And the ESP-IDF Programming Guidesays one adc unit can only run in one mode at a time, in same sample frequency. But!!!!! what i need is to sample channel0 quickly and sample channel1 slowly.So how can i do this with same adc uint?Thx a lot.

mcu: esp32s2 framework: idf5.1 adc unit: 1 adc channel: 0, 1

Jeeeeeiel commented 3 weeks ago

one solution: stop adc continuous mode and read analog value from channel0, then start adc continuous mode to sample from channel1 alternately?