Custom ESP32 board WiFi connection issues
-
- Posts: 9769
- Joined: Thu Nov 26, 2015 4:08 am
Re: Custom ESP32 board WiFi connection issues
Looks like some issue impacting WiFi reception/transmission... from what I experienced, every step in the WiFi association has a timeout for the other party to respond. If the packet gets lost somehow/somewhere, no response comes, and the association will restart from scratch.
Re: Custom ESP32 board WiFi connection issues
ESP_Sprite wrote: ↑Tue Mar 23, 2021 3:56 amLooks like some issue impacting WiFi reception/transmission... from what I experienced, every step in the WiFi association has a timeout for the other party to respond. If the packet gets lost somehow/somewhere, no response comes, and the association will restart from scratch.
Interesting... thanks for the info. My theory at the moment is that the board isn't able to transmit. I say the "board" because at this point I'm not sure if its the ESP32 itself, the matching network, or the antenna. I think this makes sense with the previous knowledge:
- board thinks it can set up a network, but network isn't visible anywhere
- board seems to sense the AP is there, but fails to auth
- board can't connect to AP since it can't send necessary packets
If I don't find something in the next day or so, I might try replacing the ESP32 on my board with a different one. Will be a pain. Will report back with findings as they arrive.
Re: Custom ESP32 board WiFi connection issues
ESP_Sprite wrote: ↑Tue Mar 23, 2021 3:56 amLooks like some issue impacting WiFi reception/transmission... from what I experienced, every step in the WiFi association has a timeout for the other party to respond. If the packet gets lost somehow/somewhere, no response comes, and the association will restart from scratch.
Aha! It does seem to be a transmission issue! I ran a scan code, and the board can see all WiFi networks, but still can't connect. I have not changed anything from my previous setup, just got some new code. This is the output from this code, which lists all the nearby 2.4GHz WiFis. Unsure what this means for my board as of yet.
- Attachments
-
- nearby_wifi.png (103.36 KiB) Viewed 7811 times
-
- Posts: 2
- Joined: Wed Mar 03, 2021 1:40 pm
Re: Custom ESP32 board WiFi connection issues
Hi @matty_t
We recently ran in the exact same issue with a custom PCB with an ESP32 and custom Antenna.
long story short:
With our design it was the crystal Oscillator, more precisely the matching of the Load Capacitance. In a Hw revision the used crystal got changed from 26MHz to 40MHz. At the same time, the rated load capacitance of the crystal changed from 8pF to 4pF. With the external Caps at both XTAL_N and XTAL_P to GND at the same value as before, the matching was nowhere near the 4pF required by the new crystal.
Which brings me to the BIG question:
What is the input capacitance of the ESP32 internal Pierce oscillator?
Normally I would expect such a specification in the Datasheet or similar, but there seems to be no mention of it in any document from Espressif and also no information on the forums.
The Input Capacitance of the ESP32 has to be calculated in to the Load matching that the crystal sees.
So:
CL_desired = CL_crystal = ((Cap_XTAL_P + CL_esp_internal_p) * (Cap_XTAL_N + CL_esp_internal_N)) / (Cap_XTAL_P + CL_esp_internal_p + Cap_XTAL_N + CL_esp_internal_N) + CL_traces
Or easier:
CL_desired = CL_crystal = (Cap_XTAL_P + CL_esp_internal_p)//(Cap_XTAL_N + CL_esp_internal_N) + CL_traces
Without information form ESP about ESP32 input capacitance this formula will never be solvable.
Hint: CL_traces are the PCB traces and typically amount to some 2pF.
Any updated from an ESP rep would be welcomed
More theory of needed: https://www.st.com/resource/en/applicat ... ronics.pdf
We recently ran in the exact same issue with a custom PCB with an ESP32 and custom Antenna.
long story short:
With our design it was the crystal Oscillator, more precisely the matching of the Load Capacitance. In a Hw revision the used crystal got changed from 26MHz to 40MHz. At the same time, the rated load capacitance of the crystal changed from 8pF to 4pF. With the external Caps at both XTAL_N and XTAL_P to GND at the same value as before, the matching was nowhere near the 4pF required by the new crystal.
Which brings me to the BIG question:
What is the input capacitance of the ESP32 internal Pierce oscillator?
Normally I would expect such a specification in the Datasheet or similar, but there seems to be no mention of it in any document from Espressif and also no information on the forums.
The Input Capacitance of the ESP32 has to be calculated in to the Load matching that the crystal sees.
So:
CL_desired = CL_crystal = ((Cap_XTAL_P + CL_esp_internal_p) * (Cap_XTAL_N + CL_esp_internal_N)) / (Cap_XTAL_P + CL_esp_internal_p + Cap_XTAL_N + CL_esp_internal_N) + CL_traces
Or easier:
CL_desired = CL_crystal = (Cap_XTAL_P + CL_esp_internal_p)//(Cap_XTAL_N + CL_esp_internal_N) + CL_traces
Without information form ESP about ESP32 input capacitance this formula will never be solvable.
Hint: CL_traces are the PCB traces and typically amount to some 2pF.
Any updated from an ESP rep would be welcomed
More theory of needed: https://www.st.com/resource/en/applicat ... ronics.pdf
Re: Custom ESP32 board WiFi connection issues
Hi @memory_stick!memory_stick wrote: ↑Tue Mar 30, 2021 1:26 pmHi @matty_t
We recently ran in the exact same issue with a custom PCB with an ESP32 and custom Antenna.
Glad to see I'm not the only one with this issue, but not glad that we are both having this issue x)
I'm also very glad you found my post, because this was indeed enlightening. When calculating my crystals load capacitance you are indeed correct when saying that I did not take the ESP32s XTAL pins into consideration. I loaded it to my crystal datasheet's spec, but due to the XTAL pins maybe the capacitance is far too large.memory_stick wrote: ↑Tue Mar 30, 2021 1:26 pmlong story short:
With our design it was the crystal Oscillator, more precisely the matching of the Load Capacitance. In a Hw revision the used crystal got changed from 26MHz to 40MHz. At the same time, the rated load capacitance of the crystal changed from 8pF to 4pF. With the external Caps at both XTAL_N and XTAL_P to GND at the same value as before, the matching was nowhere near the 4pF required by the new crystal.
Anything from an ESP rep on this topic would be quite interesting.memory_stick wrote: ↑Tue Mar 30, 2021 1:26 pmWhich brings me to the BIG question:
What is the input capacitance of the ESP32 internal Pierce oscillator?
Unfortunately this is for a school project which is finishing in a couple weeks, so we have opted for a different solution since we could not resolve this issue in time. However, with the intent of using the ESP32 in the future, I would love to hear any developments, or if anyone else is having such issues.
Also, I wasn't clear on one thing from your post: did changing the crystals loading fix the issue? Or is it still unresolved for you?
-
- Posts: 2
- Joined: Wed Mar 03, 2021 1:40 pm
Re: Custom ESP32 board WiFi connection issues
Hi matty_t
The adjustment of the load capacitance solved the problem for the time being in our case (Prototype HW, just some FW Devs who need this thing to work somewhat reliably).
We are currently in a tight spot in terms of timeline, and are not directly responsible for the HW.
In our case, with near to no external capacitance we were able to successfully get WiFi and Bluetooth working, although we do still have a start-up issue with the ESP32 sometimes, when the Shutdown / reset is not "clean".
We also noted the crystal had influence on the SPI flash operation, so the Start-up issues are probably caused also by the crystal mismatch / not oscillating right
Hope these insight helps you or anyone else in future projects. And I do hope ESP can elaborate a little on this topic too.
The adjustment of the load capacitance solved the problem for the time being in our case (Prototype HW, just some FW Devs who need this thing to work somewhat reliably).
We are currently in a tight spot in terms of timeline, and are not directly responsible for the HW.
In our case, with near to no external capacitance we were able to successfully get WiFi and Bluetooth working, although we do still have a start-up issue with the ESP32 sometimes, when the Shutdown / reset is not "clean".
We also noted the crystal had influence on the SPI flash operation, so the Start-up issues are probably caused also by the crystal mismatch / not oscillating right
Hope these insight helps you or anyone else in future projects. And I do hope ESP can elaborate a little on this topic too.
- ESP_krzychb
- Posts: 400
- Joined: Sat Oct 01, 2016 9:05 am
- Contact:
Re: Custom ESP32 board WiFi connection issues
Hi @memory_stick,memory_stick wrote: ↑Tue Mar 30, 2021 1:26 pmWhat is the input capacitance of the ESP32 internal Pierce oscillator?
The capacitance of pins is provided in the chip datasheet. Below is the value from ESP32 Series Datasheet v3.8
Who is online
Users browsing this forum: No registered users and 86 guests