DEV Community

TinkerNews
TinkerNews

Posted on

A5 on the FireBeetle 2: ADC2, Wi-Fi and two different modes

DFRobot lists this board as SKU DFR0975 and says it supports Wi-Fi.[3]

I started with the blanket warning that ADC2 and Wi-Fi do not mix. It hides the useful distinction between the ESP32-S3's oneshot driver and its continuous/DMA driver.[1][2]

The vendor's pinout image labels A5 with ADC2_0.[4] The TinkerNews pinout page maps A5 to IO11 and ADC2_CH0.[5]

Single readings

ESP-IDF's oneshot API gives a single reading on demand.[1] ADC2 is also used by Wi-Fi, and the oneshot driver protects access shared with the Wi-Fi driver.[1]

A read can still return ESP_ERR_TIMEOUT if another driver or peripheral is using the ADC. Espressif says the raw result is invalid after that error.[1]

Continuous capture

Continuous mode samples at high speed and uses DMA to move results into memory.[2] Espressif no longer supports ADC2 DMA on the S3 because of hardware limits and unstable results.[2]

The compatibility option is CONFIG_ADC_CONTINUOUS_FORCE_USE_ADC2_ON_C3_S3; it forces ADC2 use on the C3/S3 path.[2]

For occasional samples while Wi-Fi is running, I would use oneshot and check the return code.[1] For a continuous stream, I would start with ADC1 and follow the ESP32-S3 guide's supported configuration.[2]

I checked ESP-IDF 6.1.[1][2] I did not test Arduino analogRead() or measure a FireBeetle on the bench.

Our FireBeetle validator ran 15 checks and flagged eight documented defects in the vendor material. It reported zero failures, and both ADC/Wi-Fi assertions passed. I did not test a physical board, so those numbers cover source consistency and copy only.

I maintain the TinkerNews FireBeetle 2 pinout page, so the link is mine.[5]

The page marks its imported entry unreviewed, while the pinout section is reviewed by hand.[5] The A5 mapping and source drawing are there.[4][5]

Sources

[1] https://docs.espressif.com/projects/esp-idf/en/stable/esp32s3/api-reference/peripherals/adc/adc_oneshot.html
> "ADC2 is also used by Wi-Fi. adc_oneshot_read() has provided protection between the Wi-Fi driver and ADC oneshot mode driver."
[2] https://docs.espressif.com/projects/esp-idf/en/stable/esp32s3/api-reference/peripherals/adc/adc_continuous.html
> "ADC2 DMA functionality is no longer supported to retrieve ADC conversion results due to hardware limitations, as unstable results have been observed."
[3] https://wiki.dfrobot.com/dfr0975
> "Supports WiFi/Bluetooth5 LE, Mesh protocols, Matter (IoT/smart home)."
[4] https://dfimg.dfrobot.com/nobody/wiki/0aa4e609926355484ad0cab49548d2f3_0x0.jpg
> "11 A5 ADC2_0 T11"
[5] https://www.tinkernews.com/boards/dfrobot-firebeetle-2-esp32-s3
> "A5=IO11/ADC2_CH0. ESP-IDF one-shot protects ADC2 access shared with Wi-Fi; continuous/DMA ADC2 is unsupported by default on S3 (force-use config exists)."

Top comments (0)