ESP32-H2 Pinout Cheat Sheet
Hardware Overview
The ESP32-H2 is a low-power, single-core RISC-V microcontroller with integrated 2.4 GHz Bluetooth Low Energy and IEEE 802.15.4 wireless connectivity.
It supports Zigbee, Thread and Matter applications through appropriate protocol stacks. Unlike the ESP32-C3 and ESP32-C6, the ESP32-H2 does not contain a Wi-Fi radio.
This reference covers the ESP32-H2 QFN32 chip pinout, including physical package pin numbers, GPIO functions, ADC channels, USB, UART, JTAG, boot strapping and low-power pins.
Module and development-board connector assignments may differ.
| Parameter | Specification |
|---|---|
| Processor | Single-core 32-bit RISC-V |
| Maximum CPU frequency | 96 MHz |
| Internal SRAM | 320 KB |
| ROM | 128 KB |
| Low-power memory | 4 KB |
| In-package flash | 2 MB or 4 MB, variant-dependent |
| Wireless | Bluetooth LE 5.3, IEEE 802.15.4 |
| Zigbee | Supported with suitable stack |
| Thread | Supported with suitable stack |
| Matter over Thread | Supported with suitable stack |
| Wi-Fi | Not supported |
| GPIOs bonded out | 19 |
| Package | QFN32, 4 × 4 mm |
| ADC | 12-bit SAR ADC, 5 channels |
| UART | 2 |
| I2C | 2 |
| Application SPI | 1 SPI2 controller |
| USB | USB Serial/JTAG |
| PWM | LEDC, MCPWM |
| CAN-compatible controller | TWAI |
| Operating modes | Active, modem-sleep, light-sleep, deep-sleep |
The 19 GPIO signals exposed by the QFN32 package are not numbered consecutively. The GPIO numbering space is larger than the number of available physical pins.
Complete ESP32-H2 QFN32 Pinout
The following table uses physical package pin numbers, not development-board connector positions.
| Package pin | Signal | GPIO | Primary function or note |
|---|---|---|---|
| 1 | VDD3P3 | — | 3.3 V supply |
| 2 | VDD3P3 | — | 3.3 V supply |
| 3 | GPIO0 | GPIO0 | General-purpose I/O, SPI2 alternative |
| 4 | GPIO1 | GPIO1 | ADC1_CH0 |
| 5 | MTMS | GPIO2 | JTAG MTMS, ADC1_CH1 |
| 6 | MTDO | GPIO3 | JTAG MTDO, ADC1_CH2 |
| 7 | MTCK | GPIO4 | JTAG MTCK, ADC1_CH3 |
| 8 | MTDI | GPIO5 | JTAG MTDI, ADC1_CH4 |
| 9 | VDDPST1 | — | GPIO power supply |
| 10 | GPIO8 | GPIO8 | Boot strapping, LP GPIO |
| 11 | GPIO9 | GPIO9 | Boot strapping, LP GPIO |
| 12 | GPIO10 | GPIO10 | LP GPIO, comparator function |
| 13 | GPIO11 | GPIO11 | LP GPIO, comparator function |
| 14 | GPIO12 | GPIO12 | LP GPIO |
| 15 | XTAL_32K_P | GPIO13 | LP GPIO, optional 32 kHz crystal |
| 16 | XTAL_32K_N | GPIO14 | LP GPIO, optional 32 kHz crystal |
| 17 | CHIP_EN | — | Chip enable/reset control |
| 18 | VBAT | — | Power supply |
| 19 | VDDA_PMU | — | Power-management supply |
| 20 | VDDPST2 | — | GPIO power supply |
| 21 | GPIO22 | GPIO22 | General-purpose I/O |
| 22 | U0RXD | GPIO23 | UART0 receive |
| 23 | U0TXD | GPIO24 | UART0 transmit |
| 24 | GPIO25 | GPIO25 | JTAG-source strapping |
| 25 | GPIO26 | GPIO26 | USB D− |
| 26 | GPIO27 | GPIO27 | USB D+ |
| 27 | VDD3P3 | — | 3.3 V supply |
| 28 | XTAL_N | — | Main crystal negative terminal |
| 29 | XTAL_P | — | Main crystal positive terminal |
| 30 | VDD3P3 | — | 3.3 V supply |
| 31 | VDD3P3 | — | 3.3 V supply |
| 32 | ANT | — | RF antenna connection |
| Exposed pad | GND | — | Ground and thermal connection |
Important: Package pin numbers and GPIO numbers are different. Package pin 22 is GPIO23, for example.
The GPIO numbers not bonded out in this package must not be assumed available merely because they exist in a software GPIO numbering range.
GPIO Function Reference
General-Purpose GPIO Assignments
| GPIO | Digital I/O | Analogue or special function | Restriction |
|---|---|---|---|
| GPIO0 | Input/output | SPI2 FSPIQ alternative | Check SPI assignment |
| GPIO1 | Input/output | ADC1_CH0, SPI2 CS | Shared analogue function |
| GPIO2 | Input/output | ADC1_CH1, JTAG MTMS | Debug conflict |
| GPIO3 | Input/output | ADC1_CH2, JTAG MTDO | Debug conflict |
| GPIO4 | Input/output | ADC1_CH3, JTAG MTCK | Debug conflict |
| GPIO5 | Input/output | ADC1_CH4, JTAG MTDI | Debug conflict |
| GPIO8 | Input/output | LP GPIO, boot strapping | Boot restriction |
| GPIO9 | Input/output | LP GPIO, boot strapping | Boot restriction |
| GPIO10 | Input/output | LP GPIO, comparator reference | Shared analogue function |
| GPIO11 | Input/output | LP GPIO, comparator input | Shared analogue function |
| GPIO12 | Input/output | LP GPIO | Low-power capable |
| GPIO13 | Input/output | LP GPIO, XTAL_32K_P | Crystal conflict |
| GPIO14 | Input/output | LP GPIO, XTAL_32K_N | Crystal conflict |
| GPIO22 | Input/output | General peripheral routing | GPIO matrix |
| GPIO23 | Input/output | UART0 RX | Console conflict |
| GPIO24 | Input/output | UART0 TX | Console conflict |
| GPIO25 | Input/output | JTAG-source strapping | Boot-time restriction |
| GPIO26 | Input/output | USB D− | USB conflict |
| GPIO27 | Input/output | USB D+ | USB conflict |
GPIO signals may be routed to compatible peripherals through the GPIO matrix.
Direct IO MUX assignments can provide more appropriate routing for timing-sensitive functions than general GPIO matrix routing.
Boot Strapping Pins
The ESP32-H2 uses three strapping pins.
| GPIO | Function | Default condition |
|---|---|---|
| GPIO8 | Boot mode, ROM message configuration | No fixed internal pull |
| GPIO9 | Boot mode | Internal weak pull-up |
| GPIO25 | JTAG signal-source selection | No fixed internal pull |
Strapping pins are sampled during reset. Their states must meet the requirements of the desired configuration.
Boot Mode Selection
| GPIO8 | GPIO9 | Boot mode |
|---|---|---|
| Either | High | Normal SPI flash boot |
| High | Low | Joint download boot |
| Low | Low | Not a documented normal download combination |
Normal SPI boot is selected with GPIO9 high.
Joint download boot requires GPIO8 high and GPIO9 low. This mode supports UART and USB Serial/JTAG downloading.
Boot warning: Do not connect an external peripheral that holds GPIO9 low during normal startup.
A conventional BOOT button can pull GPIO9 low, but the GPIO8 state must also satisfy the download-mode requirement.
Strapping Timing
| Parameter | Requirement |
|---|---|
| Strapping setup | Supply rails established before CHIP_EN rises |
| Strapping hold | At least 3 ms after CHIP_EN rises |
| Normal GPIO use | Available after strapping has been latched |
GPIO25 selects the JTAG signal source subject to eFuse configuration. It must not be left in an uncontrolled state when its strapping function is required.
ADC Pinout
The ESP32-H2 has one 12-bit SAR ADC with five external input channels.
| ADC channel | GPIO | Package pin |
|---|---|---|
| ADC1_CH0 | GPIO1 | 4 |
| ADC1_CH1 | GPIO2 | 5 |
| ADC1_CH2 | GPIO3 | 6 |
| ADC1_CH3 | GPIO4 | 7 |
| ADC1_CH4 | GPIO5 | 8 |
GPIO2–5 are also used for external JTAG debugging.
ADC restrictions:
- Use an appropriate ADC attenuation setting.
- Do not exceed the permitted analogue input-voltage range.
- Account for source impedance and settling time.
- Use calibration for voltage measurements requiring improved accuracy.
- Avoid strong digital interference near sensitive analogue inputs.
- Do not assume ADC readings are accurate across the entire supply-voltage range.
ADC input accuracy is not determined by resolution alone. The reference, input attenuation, calibration and PCB design affect measurement error.
Analogue Comparator Pins
The ESP32-H2 includes an analogue pad voltage-comparator function.
| GPIO | Analogue function |
|---|---|
| GPIO10 | ZCD0, comparator reference input |
| GPIO11 | ZCD1, comparator signal input |
The comparator permits detection of an analogue relationship between its input and reference under supported configurations.
These pins can also be used as ordinary GPIOs when the analogue comparator is not enabled.
The comparator is not a substitute for the SAR ADC when a numerical voltage measurement is required.
USB Serial/JTAG Pinout
The ESP32-H2 includes a native USB Serial/JTAG controller.
| USB signal | GPIO | Package pin |
|---|---|---|
| USB D− | GPIO26 | 25 |
| USB D+ | GPIO27 | 26 |
| USB ground | GND | Exposed ground pad/system ground |
| USB VBUS | Board-specific | Not a dedicated GPIO |
The native USB controller supports serial communication, firmware downloading and JTAG debugging.
It is not a general-purpose USB OTG controller.
USB Restrictions
- GPIO26 and GPIO27 are assigned to the USB Serial/JTAG interface by default.
- Reassigning either pin can disable native USB communication.
- USB D+ and D− require appropriate routing and protection.
- USB VBUS must be handled according to the development board’s power architecture.
- USB HID, USB host and arbitrary USB device-class applications are not provided by this controller.
Some development boards additionally provide an external USB-to-UART converter. Such a converter is separate from the ESP32-H2 native USB functionality.
UART Pin Assignments
The ESP32-H2 provides two UART controllers.
UART0 Default Pins
| Function | GPIO | Package pin |
|---|---|---|
| UART0 RX | GPIO23 | 22 |
| UART0 TX | GPIO24 | 23 |
UART0 is commonly used for the ROM console, serial logging and firmware downloading.
Other UART signals can be routed to suitable GPIOs using the GPIO matrix.
UART Engineering Notes
- UART operates at the GPIO logic voltage.
- Do not connect RS-232 voltage levels directly.
- Use a suitable level converter for RS-232 interfaces.
- Ensure TX and RX are crossed between communicating devices.
- Connect grounds where required.
- Check console configuration before reassigning GPIO23 and GPIO24.
If UART0 is required for diagnostics, reserve its default pins during initial hardware development.
External JTAG Debugging
The ESP32-H2 supports external JTAG through GPIO2–5.
| JTAG signal | GPIO | Package pin |
|---|---|---|
| MTMS | GPIO2 | 5 |
| MTDO | GPIO3 | 6 |
| MTCK | GPIO4 | 7 |
| MTDI | GPIO5 | 8 |
These GPIOs also support ADC inputs.
Using them for analogue measurements may prevent simultaneous use of the corresponding external JTAG connections.
USB Serial/JTAG provides an alternative debugging path.
JTAG source selection depends on GPIO25 strapping and relevant eFuse settings.
SPI2 Pin Reference
The ESP32-H2 contains an application SPI controller, SPI2, separate from the internal flash interfaces.
Native IO MUX Assignments
| SPI2 signal | GPIO |
|---|---|
| FSPIQ | GPIO0 |
| FSPICS0 | GPIO1 |
| FSPIWP | GPIO2 |
| FSPIHD | GPIO3 |
| FSPICLK | GPIO4 |
| FSPID | GPIO5 |
| FSPICS1 | GPIO23 |
| FSPICS2 | GPIO24 |
| FSPICS3 | GPIO25 |
| FSPICS4 | GPIO26 |
| FSPICS5 | GPIO27 |
SPI2 may also use GPIO matrix routing where supported.
When choosing SPI pins, consider the conflicts with JTAG, ADC, UART0, USB and boot-strapping requirements.
For a basic four-wire SPI connection, the signals required are SCLK, MOSI, MISO and CS. The actual data-direction naming depends on the controller mode and software framework.
I2C and Other Peripheral Routing
The GPIO matrix allows flexible signal assignment for several application peripherals.
| Peripheral | GPIO assignment | Notes |
|---|---|---|
| I2C0 | Configurable | External pull-ups required |
| I2C1 | Configurable | External pull-ups required |
| UART1 | Configurable | Select available GPIOs |
| I2S | Configurable | Consider clock requirements |
| LEDC PWM | Configurable outputs | Up to 6 channels |
| MCPWM | Configurable outputs | Motor-control PWM |
| RMT | Configurable | Timed pulse generation and reception |
| TWAI | Configurable | External CAN transceiver required |
| Pulse counter | Configurable inputs | Pulse and edge counting |
| PARLIO | Configurable | Parallel digital I/O |
I2C Wiring
SDA and SCL require pull-up resistors to the correct logic supply.
A common starting point for a short 3.3 V bus is 4.7 kΩ, but the resistor value must satisfy the bus capacitance, rise-time and speed requirements.
GPIOs used for boot strapping should be avoided where attached pull-ups or peripherals could interfere with reset levels.
TWAI
TWAI is Espressif’s CAN-compatible controller.
The controller provides protocol-level functionality, but an external CAN transceiver is required for connection to a physical CAN bus.
Do not connect the GPIO TX and RX signals directly to CAN_H and CAN_L.
Low-Power GPIO Reference
The ESP32-H2 has a dedicated low-power subsystem.
| GPIO | Low-power capability |
|---|---|
| GPIO8 | LP GPIO |
| GPIO9 | LP GPIO |
| GPIO10 | LP GPIO |
| GPIO11 | LP GPIO |
| GPIO12 | LP GPIO |
| GPIO13 | LP GPIO |
| GPIO14 | LP GPIO |
GPIO13 and GPIO14 share their pads with the optional 32 kHz crystal interface.
The LP GPIO group can operate in supported low-power modes, including deep sleep.
Other GPIOs may have restrictions when the main digital power domain is disabled.
Deep-Sleep Considerations
- Select wake-up sources supported by the ESP32-H2.
- Use appropriate GPIO pull configurations.
- Avoid external circuits that create excessive leakage.
- Check the behaviour of GPIOs when their power domain is disabled.
- Account for the internal flash, regulators and external peripherals.
- Verify actual board current rather than relying only on the SoC figure.
The datasheet specifies a deep-sleep current of approximately 7 µA under its defined measurement conditions. A complete development board may consume substantially more.
Wireless Interface Considerations
The ESP32-H2 integrates two wireless technologies.
| Wireless technology | Support |
|---|---|
| Bluetooth Low Energy | Bluetooth 5.3 |
| Bluetooth Mesh | Supported |
| IEEE 802.15.4 | 2.4 GHz |
| Zigbee | Supported with appropriate stack |
| Thread | Supported with appropriate stack |
| Matter over Thread | Supported with appropriate stack |
| Wi-Fi | Not supported |
| Bluetooth Classic | Not supported |
The integrated 2.4 GHz antenna interface appears on package pin 32, ANT.
ANT is an RF connection and cannot be used as an ordinary GPIO.
A custom PCB requires the correct RF matching network, controlled-impedance routing and suitable antenna design.
Wireless coexistence requires scheduling because Bluetooth LE and IEEE 802.15.4 share radio resources.
GPIO Selection Quick Reference
| Requirement | GPIO |
|---|---|
| General digital I/O | Available GPIO not reserved by board hardware |
| ADC input | GPIO1–5 |
| Analogue comparator | GPIO10, GPIO11 |
| Low-power GPIO | GPIO8–14 |
| UART0 RX | GPIO23 |
| UART0 TX | GPIO24 |
| USB D− | GPIO26 |
| USB D+ | GPIO27 |
| External JTAG | GPIO2–5 |
| SPI2 clock, native | GPIO4 |
| SPI2 data, native | GPIO0, GPIO2, GPIO3, GPIO5 |
| Boot mode | GPIO8, GPIO9 |
| JTAG-source strapping | GPIO25 |
| 32 kHz crystal | GPIO13, GPIO14 |
| Wireless antenna | Dedicated ANT pin |
Pin allocation priority: Reserve boot, USB, UART debugging and RF requirements first. Then allocate application GPIOs and analogue inputs.
Common Pinout Problems
| Symptom | Likely cause | Corrective action |
|---|---|---|
| Chip enters download mode | GPIO9 low and GPIO8 high at reset | Check BOOT button and external circuitry |
| Firmware fails to start | Incorrect boot strapping | Verify GPIO8 and GPIO9 reset levels |
| No USB serial device | GPIO26/GPIO27 reassigned or USB wiring fault | Check native USB routing |
| UART0 has no output | Incorrect GPIO23/GPIO24 connection | Verify TX/RX and console configuration |
| JTAG cannot connect | GPIO2–5 or GPIO25 conflict | Check JTAG routing and source selection |
| ADC readings are unstable | Incorrect attenuation or analogue noise | Review ADC configuration and wiring |
| Comparator does not respond | Incorrect GPIO10/GPIO11 configuration | Check reference and input configuration |
| SPI device does not respond | GPIO conflict or incorrect routing | Check SPI2 signal assignments |
| I2C bus remains low | Missing/incorrect pull-ups or a device holding the bus | Measure SDA/SCL and inspect attached devices |
| TWAI communication fails | Missing external CAN transceiver | Check controller-to-transceiver wiring |
| Deep-sleep current is excessive | Board peripherals or leakage paths | Measure supply current and isolate loads |
| Wireless connection is unreliable | Antenna layout, interference or firmware configuration | Review RF hardware and coexistence |
Module and Development Board Restrictions
The bare ESP32-H2 package pinout must not be confused with the header layout of a development board.
| Hardware | Pinout consideration |
|---|---|
| Bare ESP32-H2 QFN32 | Use physical package pin numbering |
| ESP32-H2-MINI modules | Follow the exact module pinout |
| ESP32-H2-DevKitM-1 | Check development-board header mapping |
| Third-party ESP32-H2 boards | Check onboard USB, LEDs, buttons and sensors |
| Custom PCB | Follow Espressif power, RF and strapping requirements |
In-package flash is already provided by supported ESP32-H2 variants. The external application GPIO count should not be confused with internal memory-interface signals.
Some development-board pins are connected to onboard components and may not be freely available.
Electrical and PCB Design Notes
- ESP32-H2 GPIOs are intended for their specified 3.3 V supply domains.
- GPIOs are not general-purpose 5 V-tolerant inputs.
- Respect the recommended operating conditions, not merely absolute maximum ratings.
- Do not drive motors, relays or substantial loads directly from GPIO pins.
- Use appropriate transistor or driver circuits.
- Provide the required supply decoupling close to the chip.
- Do not leave CHIP_EN floating.
- Ensure strapping levels are valid during reset.
- Keep analogue signals away from high-current switching traces.
- Maintain proper USB differential routing.
- Protect the RF antenna path from unsuitable PCB routing and nearby interference.
- Check GPIO configuration and power-domain behaviour when entering deep sleep.
The final GPIO assignment must be checked against the exact ESP32-H2 silicon variant, module datasheet, PCB schematic and selected ESP-IDF configuration.
