WiFi setup interferes with digital output on pins 25/26

computer42
Posts: 5
Joined: Tue Mar 21, 2023 8:32 pm

WiFi setup interferes with digital output on pins 25/26

Postby computer42 » Tue Mar 21, 2023 9:12 pm

Using Arduino 2.0.4 with ESP-32 libraries 2.0.7
Have output devices connected to pins 25 and 26, pins in digital output mode and have called dacDisable() on both pins.
Pins work fine until WiFi.begin() is called at which point it seems they are placed back in to a DAC mode and their levels go to some indeterminite value.

Calling dacDisable() again after WiFi has connected restores the pins to their expected behaviour.

How do I prevent my outputs being interfered with by the WiFi starting up?

computer42
Posts: 5
Joined: Tue Mar 21, 2023 8:32 pm

Re: WiFi setup interferes with digital output on pins 25/26

Postby computer42 » Wed Mar 22, 2023 7:59 am

PS. Meant to say I'm using an ESP32-WROOM-DA devkit module.

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: WiFi setup interferes with digital output on pins 25/26

Postby ESP_Sprite » Thu Mar 23, 2023 4:56 am

Not sure about 26, but pin 25 is not connected. From the datasheet:
GPIO2 and GPIO25 on the ESP32-D0WD-V3 chip are designed as test points to control RF Switch (See
Figure 4 ESP32-WROOM-DA Schematics). The two pins are not led out to the module.

computer42
Posts: 5
Joined: Tue Mar 21, 2023 8:32 pm

Re: WiFi setup interferes with digital output on pins 25/26

Postby computer42 » Tue Mar 28, 2023 6:48 am

Ok, that confuses me a bit because this is the devkit I'm using, which shows the pins as available:
https://docs.espressif.com/projects/esp ... pinout.png

Until I fire up the WiFi, the pins behave as expected and control my outputs without anomoly.

Looking at the board however, I see it's a WROOM-32D not a DA module so maybe that accounts for the difference? "ESP32-WROOM-DA" was the closest board I could find in the Arduino IDE, maybe that's where the problem lies? In which case, which board should I pick there for my board labelled "ESP32_DevkitC_V4"?

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: WiFi setup interferes with digital output on pins 25/26

Postby ESP_Sprite » Tue Mar 28, 2023 7:56 am

Ah, -D and -DA are two entirely different beasts; in that case ignore my comment above.

computer42
Posts: 5
Joined: Tue Mar 21, 2023 8:32 pm

Re: WiFi setup interferes with digital output on pins 25/26

Postby computer42 » Wed Mar 29, 2023 8:50 pm

Yes, I can see that now too. Is "ESP32-WROOM-DA" the correct board type for a WROOM-32D on a ESP32_DevkitC_V4?

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: WiFi setup interferes with digital output on pins 25/26

Postby ESP_Sprite » Thu Mar 30, 2023 6:53 am

Probably not, as as I said -DA is not the same module as -D. I don't have enough experience with this to tell you what to select, though.

computer42
Posts: 5
Joined: Tue Mar 21, 2023 8:32 pm

Re: WiFi setup interferes with digital output on pins 25/26

Postby computer42 » Fri Mar 31, 2023 9:21 pm

OK seems like it was my bad.
I am using a ESP32_DevkitC_V4 with a WROOM-32D module.
Rookie mistake was to pick the board which most closely matched the processor - turns out that "ESP32-WROOM-DA" is the wrong board type to pick, and the correct one is actually just "ESP32 Dev Module". Having picked that, the pins work as expected.
This is my first usage of ESP32 and the internet had not given me sufficient clues on the correct module to pick, and everything else was working fine even with the wrong module selected.

Who is online

Users browsing this forum: No registered users and 28 guests