ESP32-S3 using ADC2 pins and wifi

MatDiscoveryDev
Posts: 4
Joined: Fri Mar 14, 2025 7:13 pm

ESP32-S3 using ADC2 pins and wifi

Postby MatDiscoveryDev » Fri Mar 14, 2025 7:26 pm

Hi everyone, this is my first discussion (and first post in a forum ever) so, sorry if i do something wrong but just focus on the problem please.
So, my problem is that i need to read two magnetic encoders, a gps through UART1, write to psram, and use wifi.
The board i'm using is an ESP32-S3 WROOM-1 DEVKIT-C1 N16R8, with arduino IDE.
This board has 4 spi busses, but i can only use one (FSPI, 10,11,12,13) because the octal psram and flash uses the other 3 when psram is activated.
This bus, is part of the ADC2 pins, i can read analog signals from the encoders and save them in buffers in the psram, but can't connect the wifi after the recordings even when i'm not using those pins anymore.
For the gps i use pins 17 and 18, both still in ADC2 pin layout.
Can someone help me understand how to turn off spi communication (i tried with spi.end() ) or a different solution?
Attachments
Screenshot_20250314-202516.png
the pinout of the board i'm using
Screenshot_20250314-202516.png (683.07 KiB) Viewed 7232 times

ahsrabrifat
Posts: 201
Joined: Sat Jan 18, 2025 2:31 pm

Re: ESP32-S3 using ADC2 pins and wifi

Postby ahsrabrifat » Sat Mar 15, 2025 2:18 pm

Since the ESP32-S3 has a GPIO matrix, you might be able to remap SPI to other free pins not in ADC2. Try this:

Code: Select all


SPI.begin(SCK, MISO, MOSI, SS);  // Assign different pins

Example:

SCK: GPIO5
MISO: GPIO6
MOSI: GPIO7
SS: GPIO8

MatDiscoveryDev
Posts: 4
Joined: Fri Mar 14, 2025 7:13 pm

Re: ESP32-S3 using ADC2 pins and wifi

Postby MatDiscoveryDev » Sat Mar 15, 2025 2:45 pm

i tried that:
spi pins mosi(5) clk(6) miso(7)
cs pins 1 and 2
uart pins 10 and 9
it works, still the wifi doesn't work, BUT i noticed another thing.
when i unplug every pin from the breadboard, leaving the esp32 alone on it, wifi doesn't work, when i place a screw driver under the esp32 and pop it off, the wifi magically connect instantly.
Saw different users having problems with esp32 wifi while connected on breadboard, what could cause this problem?

ahsrabrifat
Posts: 201
Joined: Sat Jan 18, 2025 2:31 pm

Re: ESP32-S3 using ADC2 pins and wifi

Postby ahsrabrifat » Sun Mar 16, 2025 1:35 pm

The ESP32-S3 shares ADC2 pins with WiFi. When you use ADC2, it can interfere with WiFi functionality.
Even if you stop using ADC2 pins after recording, the WiFi driver might still see them as occupied.
Using SPI on FSPI pins (10,11,12,13) might also cause conflicts because the flash/PSRAM uses the other SPI buses. Some PSRAM configurations can cause instability. If possible, test WiFi with PSRAM disabled.

MatDiscoveryDev
Posts: 4
Joined: Fri Mar 14, 2025 7:13 pm

Re: ESP32-S3 using ADC2 pins and wifi

Postby MatDiscoveryDev » Sun Mar 16, 2025 2:27 pm

i'm usind ADC1 pins now, how i said in my second response, no ADC2 pins are used.
I have it all working, just trying to understand something now, the problem is another, esp32-s3 is on the breadboard, if i unplug EVERY cable, leaving the esp32-s3 alone on the breadboard, the wifi doesn't work anyway, the moment i unplug the esp32 from the breadboard where nothing else was connected, the esp wifi connects immediately.
tried that with different spots of the breadboard and different breadboards, the esp32 wifi works only when it's unplugged from the breadboard.
Now i have it hanging in the air and the pins are connected through male(to components on breadboard) to female(to connect esp32 pins) and it all works, I still don't understand why I can't plug it on the breadboard...

Who is online

Users browsing this forum: YisouSpider and 3 guests