Page 1 of 1

ESP32-C3 ADC2 timeout

Posted: Tue Dec 07, 2021 4:14 pm
by claudea2
Hello,
The ADC2 channel 0 will timeout when it collides with Wi-Fi (Wi-Fi being active). I have 2 questions:
1- Will it timeout out all the time or randomly?
2- How long is the timeout compared to a normal conversion?

I am designing a board that uses all the ADC channels and has a battery. I plan to use ADC2 to measure the battery voltage. If the timeout is random and not too long, I can do occasional conversions and keep the successful results. Batteries do not require frequent measurements (once every few minutes is fine). If the timeout is too long or occurs all thee time, I will have to turn off the Wi-Fi to do the measurements.
Thanks
EDIT
I have found that adc2_get_raw will return one of four states: ESP_OK, ESP_ERR_INVALID_STATE, ESP_ERR_TIMEOUT and ESP_ERR_INVALID_ARG.