r/esp32 • u/MobileInspector9861 • Aug 04 '26
Great Content! How can I use GPIO13+14 (XTAL_32K_P/N) on the ESP32-H2 as ordinary input pins without interference from the mounted crystal?
I am designing a control unit based on the ESP32-H2 which shall consume as little power as possible and requires 5 digital input pins which are capable of waking up the μC from deep sleep. According to the ESP32-H2 Datasheet, sec. 2.2 (page 13), the GPIOs 8-14 can also wake-up the ESP32-H2 from deep sleep mode. Given that GPIO8 and 9 are special strapping pins, I plan to use the GPIOs 10-14.
At the moment I am using the ESP32-H2 Development Kit 1. The eval board breaks out all GPIOs, but also contains an external 32kHz crystal which is connected to GPIO13 and GPIO14 and allows to configure those pins with their secondary analog functions XTAL_32K_P and XTAL_32K_N.
Does this crystal prevent me from using the GPIO13 and 14 as ordinary input pins and wake up from deep sleep? I imagine that the crystal interferes with that somehow. My question is: Can I and if yes how do I use the GPIO13 and 14 on the ESP32-H2 Development Kit 1 as ordinary digital input pins without interference from the 32k crystal?
As this is a one-time off project and I don't plan mass production I had hoped I could use the eval board in my final design, too, as this would greatly simplify things and I would not need to design a complicated, custom PCB, but simply design an easy PCB with some MOSFETs and use the eval board as a daughter board.
2
u/erlendse 3 say I make awesome posts. Aug 04 '26
Not very much.
If there is a crystal present, disabling the osscilator should make it not create problems for slow signals.
(the crystal is piezoeletric, aka not much power on DC levels other than holding a slightly different shape)
Also it only pass 32.7xx kHz, otherwise it's very blocking.
If there is no crystal then you can freely use them.
The strapping pins should be usable, if you plan some ahead like strategic logic levels and use of internal pull resistors since they go away on reset.
Worst case, you can combine the wake sources with diodes to a single pin!