Home » ESP32-C5 Pinout Cheat Sheet

ESP32-C5 Pinout Cheat Sheet

by shedboy71
esp32 cheat sheets

ESP32-C5 Pinout Cheat Sheet

Hardware Overview

The ESP32-C5 is a 32-bit RISC-V microcontroller featuring dual-band 2.4 GHz and 5 GHz Wi-Fi 6, Bluetooth Low Energy and IEEE 802.15.4 wireless connectivity.

It is intended for wireless IoT applications requiring 5 GHz Wi-Fi, Zigbee, Thread, Matter or combinations of supported wireless protocols.

This reference covers the ESP32-C5 chip-level GPIO assignments, including physical package pins, analogue inputs, boot strapping, USB Serial/JTAG, UART, SPI, low-power GPIO and memory-interface restrictions.

The ESP32-C5 uses a 48-pin package. Module pinouts and development-board header assignments differ from the bare-chip package.

Parameter Specification
Main processor 32-bit RISC-V
Main CPU Single core
Wireless 2.4 GHz and 5 GHz Wi-Fi 6
Bluetooth Bluetooth 5 LE
IEEE 802.15.4 Supported
Zigbee and Thread Supported with suitable stacks
GPIO identifiers GPIO0–GPIO28
GPIO count 29
Low-power GPIO GPIO0–GPIO6
SAR ADC 6 external channels
ADC resolution 12-bit
USB USB Serial/JTAG
Main crystal Dedicated XTAL_P and XTAL_N
Package options QFN48 and LGA48, variant-dependent
GPIO routing IO MUX and GPIO matrix

Package distinction: The physical pin numbers below describe the 48-pin ESP32-C5 package. They are not GPIO numbers or module header positions.

Complete ESP32-C5 Package Pin Reference

Package pin Signal GPIO Function
1 VDDA6 — Analogue power supply
2 GND — Ground
3 VDDA7 — Analogue power supply
4 XTAL_N — Main crystal negative terminal
5 XTAL_P — Main crystal positive terminal
6 VDDA8 — Analogue power supply
7 CHIP_PU — Chip enable and reset
8 VDDPST1 — Low-power I/O supply
9 XTAL_32K_P GPIO0 32 kHz crystal, LP GPIO
10 XTAL_32K_N GPIO1 32 kHz crystal, ADC
11 MTMS GPIO2 JTAG, ADC
12 MTDI GPIO3 JTAG, ADC
13 MTCK GPIO4 JTAG, ADC
14 MTDO GPIO5 JTAG, ADC
15 GPIO6 GPIO6 ADC, LP GPIO, SPI2
16 GPIO7 GPIO7 SDIO, SPI2, strapping
17 GPIO8 GPIO8 SDIO, comparator
18 GPIO9 GPIO9 SDIO, comparator
19 GPIO10 GPIO10 SDIO, SPI2
20 U0TXD GPIO11 UART0 transmit
21 U0RXD GPIO12 UART0 receive
22 GPIO13 GPIO13 USB D−, SDIO
23 GPIO14 GPIO14 USB D+, SDIO
24 VDDPST2 — High-performance I/O supply
25 SPICS1 / NC GPIO15 PSRAM chip select
26 SPICS0 / NC GPIO16 Flash chip select
27 SPIQ / NC GPIO17 Flash data
28 SPIWP / NC GPIO18 Flash write protect/data
29 VDD_SPI / NC GPIO19 Flash supply function
30 SPIHD / NC GPIO20 Flash hold/data
31 SPICLK / NC GPIO21 Flash clock
32 SPID / NC GPIO22 Flash data
33 GPIO23 GPIO23 General-purpose I/O
34 GPIO24 GPIO24 General-purpose I/O
35 GPIO25 GPIO25 SDIO strapping
36 GPIO26 GPIO26 Boot strapping
37 GPIO27 GPIO27 Boot strapping
38 GPIO28 GPIO28 Boot strapping
39 VDDPST3 — High-performance I/O supply
40 VDDA1 — Analogue power supply
41 VDDA2 — Analogue power supply
42 ANT_2G — 2.4 GHz RF connection
43 GND — Ground
44 VDDA3 — Analogue power supply
45 VDDA4 — Analogue power supply
46 VDDA5 — Analogue power supply
47 GND — Ground
48 ANT_5G — 5 GHz RF connection

The /NC designations are variant-dependent.

On ESP32-C5HF4, several external-memory package positions are not connected. On ESP32-C5NF8R2LA, the SPICS1 position is also not connected.

Do not assume these pins are available as ordinary GPIOs simply because another ESP32-C5 variant exposes the corresponding signal.

GPIO0–14 Function Reference

GPIO Package pin Analogue or LP function Other function
GPIO0 9 LP_GPIO0 XTAL_32K_P
GPIO1 10 ADC1_CH0, LP_GPIO1 XTAL_32K_N
GPIO2 11 ADC1_CH1, LP_GPIO2 MTMS, FSPIQ
GPIO3 12 ADC1_CH2, LP_GPIO3 MTDI
GPIO4 13 ADC1_CH3, LP_GPIO4 MTCK, FSPIHD
GPIO5 14 ADC1_CH4, LP_GPIO5 MTDO, FSPIWP
GPIO6 15 ADC1_CH5, LP_GPIO6 FSPICLK
GPIO7 16 — SDIO_DATA1, FSPID
GPIO8 17 PAD_COMP0 SDIO_DATA0
GPIO9 18 PAD_COMP1 SDIO_CLK
GPIO10 19 — SDIO_CMD, FSPICS0
GPIO11 20 — U0TXD
GPIO12 21 — U0RXD
GPIO13 22 USB D− SDIO_DATA3
GPIO14 23 USB D+ SDIO_DATA2

GPIO0–6 support the low-power GPIO subsystem.

GPIO2–5 are associated with external JTAG debugging and also provide ADC inputs.

GPIO13 and GPIO14 are assigned to USB Serial/JTAG by default.

GPIO15–28 Function Reference

GPIO Package pin Function Restriction
GPIO15 25 SPICS1 External PSRAM interface
GPIO16 26 SPICS0 External flash interface
GPIO17 27 SPIQ External flash interface
GPIO18 28 SPIWP External flash interface
GPIO19 29 VDD_SPI Flash supply function
GPIO20 30 SPIHD External flash interface
GPIO21 31 SPICLK External flash interface
GPIO22 32 SPID External flash interface
GPIO23 33 General-purpose GPIO Board-specific allocation
GPIO24 34 General-purpose GPIO Board-specific allocation
GPIO25 35 General-purpose GPIO SDIO timing strapping
GPIO26 36 General-purpose GPIO Boot strapping
GPIO27 37 General-purpose GPIO Boot strapping, ROM logging
GPIO28 38 General-purpose GPIO Boot strapping

Memory-interface warning: GPIO15–18 and GPIO20–22 are normally associated with the SPI0/SPI1 flash and PSRAM interface.

These GPIOs should not be assigned to application peripherals when they are required by the installed memory.

GPIO19 requires separate consideration because the corresponding package position serves the VDD_SPI flash supply function. Using it as ordinary GPIO is conditional on a compatible flash power arrangement and device variant.

GPIO23 and GPIO24 are generally more suitable starting points for ordinary digital I/O.

GPIO25–28 can also be used for applications, but external circuits must not interfere with their required reset-time strapping levels.

Boot Strapping Pins

The ESP32-C5 uses several strapping pins to establish boot behaviour, JTAG routing, SDIO timing and ROM diagnostic settings.

GPIO Strapping function
GPIO7 JTAG signal source
GPIO25 SDIO sampling/driving clock edge
GPIO26 Boot-mode selection
GPIO27 Boot mode and ROM messages
GPIO28 Boot-mode selection
GPIO2 / MTMS JTAG-related strapping
GPIO3 / MTDI SDIO clock-edge selection

Boot Mode Selection

GPIO26 GPIO27 GPIO28 Boot mode
High Any Any Normal SPI flash boot
Low Any High Joint Download Boot 0
Low Low Low Joint Download Boot 1

The two download modes provide different supported interfaces.

Joint Download Boot 0 supports UART0 and USB Serial/JTAG downloading. SPI slave downloading is also supported on the chip revisions for which that feature is documented.

Joint Download Boot 1 supports UART0 and SDIO downloading.

For normal firmware execution from flash, GPIO26 must be high when the boot configuration is sampled.

GPIO27 and GPIO28 have internal weak pull-ups by default. GPIO26 does not have a specified default internal pull that should be relied upon for selecting normal boot.

Strapping Timing

Parameter Minimum
Strapping setup time 0 ms after supply stabilisation
Strapping hold time 3 ms after CHIP_PU rises

Strapping levels are sampled and latched during chip reset.

External pull-ups, pull-downs and connected peripherals must establish valid levels during this interval.

PCB warning: Avoid attaching circuits that force GPIO26 low during normal power-up or create conflicting levels on GPIO27 and GPIO28.

ADC Pin Assignments

The ESP32-C5 provides a SAR ADC with six external channels.

ADC channel GPIO Package pin
ADC1_CH0 GPIO1 10
ADC1_CH1 GPIO2 11
ADC1_CH2 GPIO3 12
ADC1_CH3 GPIO4 13
ADC1_CH4 GPIO5 14
ADC1_CH5 GPIO6 15

GPIO2–5 are shared with external JTAG signals.

GPIO1 is shared with the optional 32 kHz crystal connection.

ADC Engineering Notes

  • Configure attenuation for the intended input range.
  • Keep the input voltage within the permitted electrical limits.
  • Account for analogue source impedance and ADC sampling requirements.
  • Use ADC calibration when converting raw readings to voltages.
  • Reduce coupling from high-current switching and RF circuitry.
  • Do not assume that ADC resolution establishes absolute measurement accuracy.

The available ADC channels are fixed to the GPIOs listed above; they cannot be reassigned arbitrarily through the GPIO matrix.

Analogue Voltage Comparator

The ESP32-C5 has an analogue voltage comparator associated with two pads.

Function GPIO Package pin
PAD_COMP0 GPIO8 17
PAD_COMP1 GPIO9 18

The comparator permits comparison of analogue levels under supported configurations.

GPIO8 and GPIO9 are also associated with SDIO functions, so the chosen configuration must avoid peripheral conflicts.

The analogue comparator does not provide a numerical voltage measurement equivalent to the SAR ADC.

USB Serial/JTAG Pinout

USB signal GPIO Package pin
USB D− GPIO13 22
USB D+ GPIO14 23
USB VBUS Board-specific No dedicated GPIO
Ground GND System ground

The ESP32-C5 provides USB Serial/JTAG for firmware downloading, serial communication and JTAG debugging.

It is not equivalent to the general-purpose USB OTG peripheral available on some other ESP32 devices.

USB Restrictions

  • GPIO13 and GPIO14 are assigned to USB Serial/JTAG by default.
  • Reconfiguring these pins as ordinary GPIOs can disable the USB interface.
  • D+ and D− must be routed as USB signals when native USB is required.
  • USB connector power and VBUS handling depend on the board design.
  • USB Serial/JTAG does not provide a general-purpose USB host controller.

The ESP32-C5 also supports configuration to exchange the USB D+ and D− assignments. This does not remove the requirement to use the dedicated USB-capable GPIO pair.

UART Pin Reference

The ESP32-C5 provides UART controllers with configurable GPIO routing.

Default UART0

UART signal GPIO Package pin
U0TXD GPIO11 20
U0RXD GPIO12 21

UART0 is commonly used for ROM messages, firmware downloading and serial-console communication.

Other application UART assignments can use the GPIO matrix where supported.

The default UART0 pins are convenient for initial debugging because they correspond to the chip’s native UART0 signal assignments.

UART Wiring

Connection Requirement
ESP32 TX Connect to peripheral RX
ESP32 RX Connect to peripheral TX
GND Shared reference where required
Logic voltage Compatible with GPIO supply
RS-232 interface External level converter required

Do not connect conventional RS-232 voltage levels directly to the ESP32-C5.

External JTAG Debugging

JTAG signal GPIO Package pin
MTMS GPIO2 11
MTDI GPIO3 12
MTCK GPIO4 13
MTDO GPIO5 14

These pins are also ADC-capable.

Using them for analogue sensors or other peripherals can interfere with external JTAG debugging.

The ESP32-C5 also supports JTAG through its USB Serial/JTAG controller. Selection of the JTAG signal source depends on strapping and eFuse configuration.

eFuse changes can be irreversible. Do not modify JTAG-related eFuses merely to change a development-board connection without reviewing their effects.

SPI Peripheral Pinout

The ESP32-C5 distinguishes between SPI0/SPI1 memory interfaces and the general-purpose SPI2 controller.

SPI2 Native Pin Assignments

SPI2 signal GPIO
FSPIQ GPIO2
FSPIHD GPIO4
FSPIWP GPIO5
FSPICLK GPIO6
FSPID GPIO7
FSPICS0 GPIO10

SPI2 supports additional GPIO matrix routing where permitted.

For a conventional SPI connection, the required signals are clock, data output, data input and chip select.

The native assignments may be useful when timing requirements make direct IO MUX routing preferable.

SPI Pin Conflicts

GPIO2, GPIO4 and GPIO5 overlap with JTAG and ADC functionality.

GPIO7 is a strapping pin.

Consequently, the native SPI2 group is not automatically the best assignment for every development board.

The GPIO matrix can provide alternative routing, subject to peripheral timing and signal-integrity requirements.

SPI0/SPI1 Memory Interface

Signal GPIO
SPICS1 GPIO15
SPICS0 GPIO16
SPIQ GPIO17
SPIWP GPIO18
VDD_SPI GPIO19
SPIHD GPIO20
SPICLK GPIO21
SPID GPIO22

These connections are normally reserved for external flash and PSRAM where fitted.

Do not use the memory-interface GPIOs for ordinary SPI sensors merely because their signal names resemble application SPI functions.

SDIO Slave Interface

The ESP32-C5 provides an SDIO slave controller for communication with an external host.

SDIO signal GPIO
SDIO_DATA0 GPIO8
SDIO_DATA1 GPIO7
SDIO_DATA2 GPIO14
SDIO_DATA3 GPIO13
SDIO_CLK GPIO9
SDIO_CMD GPIO10

GPIO13 and GPIO14 are also used by USB Serial/JTAG.

The SDIO slave and USB Serial/JTAG interfaces cannot necessarily operate simultaneously in every bus-width configuration.

In particular, quad-SPI-mode SDIO use conflicts with the default USB signals.

SDIO applications must also account for the GPIO7 strapping function and the required electrical pull configurations.

Low-Power GPIO and RTC Functions

The ESP32-C5 supports seven low-power GPIO signals.

GPIO LP designation Additional function
GPIO0 LP_GPIO0 32 kHz crystal positive terminal
GPIO1 LP_GPIO1 32 kHz crystal negative terminal, ADC
GPIO2 LP_GPIO2 LP UART RTS, LP I2C SDA
GPIO3 LP_GPIO3 LP UART CTS, LP I2C SCL
GPIO4 LP_GPIO4 LP UART RX
GPIO5 LP_GPIO5 LP UART TX
GPIO6 LP_GPIO6 LP GPIO

These pins are associated with the low-power subsystem and can support selected functions while the high-performance system is inactive.

Low-Power Peripheral Assignment

LP function GPIO
LP I2C SDA GPIO2
LP I2C SCL GPIO3
LP UART RX GPIO4
LP UART TX GPIO5
LP UART RTS GPIO2
LP UART CTS GPIO3
LP UART DTR GPIO0
LP UART DSR GPIO1

LP I2C and LP UART flow-control signals share GPIO2 and GPIO3. They cannot be used simultaneously on the same pads for conflicting functions.

GPIO0 and GPIO1 may be occupied by an external 32 kHz crystal circuit.

When planning deep-sleep applications, verify the selected GPIO retention behaviour, wake-up configuration and low-power peripheral support in the chosen ESP-IDF version.

GPIO Power Domains

GPIO group Power domain
GPIO0–12 VDDPST1
GPIO13–14 VDDPST2
GPIO15–22 VDD_SPI-related memory domain
GPIO23–28 VDDPST3

The actual voltage and permissible operation of each group depend on the chip power configuration.

GPIO19 is particularly sensitive because its package connection has the VDD_SPI function.

The power domains must be configured and supplied according to the exact chip variant’s electrical requirements.

Electrical restriction: Do not assume GPIOs are 5 V tolerant. External input signals must remain within the permitted voltage range of the corresponding supply domain.

GPIO Selection Quick Reference

Application Pin selection
General digital I/O GPIO0–6, GPIO8–12, GPIO23–24 where free
ADC input GPIO1–6
Analogue comparator GPIO8, GPIO9
Low-power GPIO GPIO0–6
LP I2C GPIO2, GPIO3
LP UART GPIO4, GPIO5
Native SPI2 clock GPIO6
Native SPI2 chip select GPIO10
UART0 TX GPIO11
UART0 RX GPIO12
USB D− GPIO13
USB D+ GPIO14
External JTAG GPIO2–5
SDIO slave GPIO7–10, GPIO13–14
Boot selection GPIO26–28
JTAG-source selection GPIO7
Memory interface GPIO15–22
2.4 GHz antenna ANT_2G
5 GHz antenna ANT_5G

The table identifies chip capabilities. It does not guarantee that a particular module exposes every signal.

Common GPIO and Boot Problems

Symptom Likely cause Corrective action
Chip fails to boot normally GPIO26 not high at reset Verify boot strapping
Firmware enters download mode GPIO26–28 select download mode Measure strapping levels
USB serial device not detected GPIO13/14 reassigned Restore USB routing
UART0 console has no output Incorrect GPIO11/12 connection Check TX/RX and console settings
External JTAG fails GPIO2–5 reconfigured Restore JTAG or use supported USB debugging
ADC input reads incorrectly Wrong channel or attenuation Check GPIO1–6 mapping
SPI peripheral fails GPIO conflict or matrix configuration Verify SPI2 assignments
Flash or PSRAM fails Memory pins reused Restore memory interface
SDIO interface fails USB conflict or incorrect bus width Review GPIO13/14 allocation
I2C bus stuck low Missing pull-up or held-low line Measure SDA/SCL and isolate devices
Deep-sleep current too high Board circuitry or LP configuration Isolate external loads
5 GHz Wi-Fi fails RF configuration, antenna or network issue Check band support and RF design

Module and Development Board Restrictions

The GPIO capabilities of the ESP32-C5 chip are distinct from those exposed by modules or development boards.

Hardware Pinout consideration
Bare ESP32-C5 QFN48 Use package pin numbering
ESP32-C5 LGA48 variant Use variant-specific package documentation
ESP32-C5 with in-package flash Some memory package pins are NC
ESP32-C5 with PSRAM Account for reserved memory signals
ESP32-C5 development board Check onboard USB, UART, buttons and peripherals
Custom PCB Follow power, boot, flash and dual-band RF requirements

The ESP32-C5 includes separate RF connections for its 2.4 GHz and 5 GHz bands.

These are analogue RF terminals, not GPIO signals.

A custom PCB requires appropriate impedance-controlled RF routing, matching networks, antenna selection and layout.

Electrical and PCB Design Notes

  • Keep GPIO voltages within the relevant supply-domain limits.
  • Avoid direct connection to 5 V logic without suitable level shifting.
  • Reserve GPIO15–22 for flash/PSRAM where required.
  • Do not repurpose the VDD_SPI connection without a compatible memory power design.
  • Maintain valid boot strapping levels on GPIO26–28.
  • Consider GPIO7 when configuring JTAG.
  • Reserve GPIO13 and GPIO14 when native USB Serial/JTAG is required.
  • Avoid conflicts between ADC and JTAG functions on GPIO2–5.
  • Use external drivers for motors, relays and other substantial loads.
  • Provide correct pull-up resistors for I2C and applicable SDIO signals.
  • Follow the required power sequencing for CHIP_PU and the supply rails.
  • Keep analogue traces away from high-current switching paths.
  • Use separate, appropriate RF routing for the 2.4 GHz and 5 GHz antenna terminals.
  • Verify available GPIOs against the exact module and development-board schematic.

For custom hardware, the final pin allocation must be checked against the selected ESP32-C5 variant, its flash/PSRAM configuration, GPIO power domains and reset-time strapping requirements.

Download

You can download the free ESP32 cheat sheets here

You may also like

Adblock Detected

Please support us by disabling your AdBlocker extension from your browsers for our website.