esp32s2 ADC2 和 WiFi

yogi_yi
Posts: 65
Joined: Tue May 25, 2021 11:02 am

esp32s2 ADC2 和 WiFi

Postby yogi_yi » Fri Jul 23, 2021 8:28 am

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 模块也不能用?

ESP_Gargamel
Posts: 786
Joined: Wed Nov 14, 2018 8:45 am

Re: esp32s2 ADC2 和 WiFi

Postby ESP_Gargamel » Fri Jul 23, 2021 12:52 pm

可以当 IO 口用,只是说这些 IO 不要拿来当 ADC2 用。和 DAC 没啥关系,DAC 可以用。

ztdh88
Posts: 1
Joined: Thu Mar 03, 2022 3:28 pm

Re: esp32s2 ADC2 和 WiFi

Postby ztdh88 » Thu Mar 03, 2022 3:31 pm

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

Who is online

Users browsing this forum: No registered users and 87 guests