I chose a 40MHz 9pF ±10ppm crystal and 12pF load capacitors (based on the trace lengths, I calculated the load capacitors to 13.7pF (maybe I should have chosen 15pF)). I ran the XTAL_N trace under the crystal (same layer) but have a solid GND pour (opposite side), no other traces. Crystal is a bit close to the chip (1.9mm distance, forgot to place it far away). If my oscilloscope is accurate, i see XTAL_P (40.02MHz 540mV) and XTAL_N (40.01MHz 804mV).
There are no signal traces under the RF path. The chip layer (top) GND pour is cutout around the chip, and a solid bottom GND pour. RF path has a CLC (pi) -> SAW filter -> CLC (pi) -> SWRA117D PCB antenna from TI AN043 application note. Antenna is in a corner, and has no GND pour on top or bottom, but via stitching around with good distance.
I'm using Arduino IDE for testing. I tried both scan examples. It finds quite a lot of Wifi networks and bluetooth clients around me. I then tried the Bluetooth "Write" example and downloaded BLE scanner app. "MyESP32" shows up in the client list in the BLE scanner app, but when I try to connect, it times out. I then tried the "WiFiClient" example, and sometimes it connects to my router, other times it's stuck:
Code: Select all
[STA.cpp:135] _onStaArduinoEvent(): Reason: 2 - AUTH_EXPIRE
[STA.cpp:537] disconnect(): STA already disconnected.
(lot of these, until finally):
[STA.cpp:135] _onStaArduinoEvent(): Reason: 39 - TIMEOUT
What could cause this problem?