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