Page 1 of 1

esp32s2 ADC2 和 WiFi

Posted: Fri Jul 23, 2021 8:28 am
by yogi_yi
API 有如下介绍
Since the ADC2 module is also used by the Wi-Fi, reading operation of adc2_get_raw() may fail between esp_wifi_start() and esp_wifi_stop(). Use the return code to see whether the reading is successful.

如果是我使用WIFI功能 ,ADC2 模块功能会有冲突 ,还是 ADC2相关引脚也不能做普通IO口用,或者 DAC 模块也不能用?

Re: esp32s2 ADC2 和 WiFi

Posted: Fri Jul 23, 2021 12:52 pm
by ESP_Gargamel
可以当 IO 口用,只是说这些 IO 不要拿来当 ADC2 用。和 DAC 没啥关系,DAC 可以用。

Re: esp32s2 ADC2 和 WiFi

Posted: Thu Mar 03, 2022 3:31 pm
by ztdh88
esp32s2有仲裁器,可以在使用ADC2的时候使用wifi,
引用官方的话

Code: Select all

Note
ESP32: For a given channel, adc2_config_channel_atten() must be called before the first time this function is called. If Wi-Fi is started via esp_wifi_start(), this function will always fail with ESP_ERR_TIMEOUT.

Note
ESP32-S2: ADC2 support hardware arbiter. The arbiter is to improve the use efficiency of ADC2. After the control right is robbed by the high priority, the low priority controller will read the invalid ADC2 data. Default priority: Wi-Fi > RTC > Digital;
链接https://docs.espressif.com/projects/esp ... s/adc.html