ESP32-P4 Function-EV pinout
The ESP32-P4 Function-EV (ESP32-P4) pinout: what each pin does, from GPIO, analog inputs and PWM to UART, I2C and SPI, with the notes that catch people out.
The board
- Processor: 32-bit RISC-V, 2 cores, up to 400 MHz, plus a low-power core
- SRAM: 768 KB
- Flash: 4 MB as simulated (real modules carry 4–32 MB)
- Logic level: 3.3 V; the pins are not 5 V tolerant
- Radio: None on the chip; the Function-EV board adds an ESP32-C6 for Wi-Fi and Bluetooth
- GPIO: 55 (GPIO0–54)
- Analog inputs: 12-bit, 14 channels: ADC1 on GPIO16–23, ADC2 on GPIO49–54
- Touch: 14 channels, GPIO2–15
- USB: High-speed USB OTG; full-speed OTG on GPIO26/27; USB Serial/JTAG on GPIO24/25
- Serial (UART0): TX GPIO37, RX GPIO38
- I2C (Wire): SDA GPIO7, SCL GPIO8
- SPI: SCK GPIO36, MISO GPIO33, MOSI GPIO32, SS GPIO26
- On-board LED: None you can drive
Pins
| Pin | Functions | Notes |
|---|---|---|
| IO0 | GPIO0 | |
| IO1 | GPIO1 | |
| IO2 | GPIO2, T0, MTCK | Capacitive touch: touchRead(T0). JTAG MTCK when JTAG is taken from the pins instead of USB. |
| IO3 | GPIO3, T1, MTDI | Capacitive touch: touchRead(T1). JTAG MTDI when JTAG is taken from the pins instead of USB. |
| IO4 | GPIO4, T2, MTMS | Capacitive touch: touchRead(T2). JTAG MTMS when JTAG is taken from the pins instead of USB. |
| IO5 | GPIO5, T3, MTDO | Capacitive touch: touchRead(T3). JTAG MTDO when JTAG is taken from the pins instead of USB. |
| IO6 | GPIO6, T4 | Capacitive touch: touchRead(T4). |
| IO7 | GPIO7, T5, SDA | Capacitive touch: touchRead(T5). Default I2C SDA for Wire. |
| IO8 | GPIO8, T6, SCL | Capacitive touch: touchRead(T6). Default I2C SCL for Wire. |
| IO20 | GPIO20, A4, ADC1_CH4 | Analog input: analogRead(A4) reads ADC1_CH4. |
| IO21 | GPIO21, A5, ADC1_CH5 | Analog input: analogRead(A5) reads ADC1_CH5. |
| IO22 | GPIO22, A6, ADC1_CH6 | Analog input: analogRead(A6) reads ADC1_CH6. |
| IO23 | GPIO23, A7, ADC1_CH7 | Analog input: analogRead(A7) reads ADC1_CH7. |
| IO24 | GPIO24, USB D- | USB Serial/JTAG D-. Using it as a GPIO turns off the chip's own USB port. |
| IO25 | GPIO25, USB D+ | USB Serial/JTAG D+. Using it as a GPIO turns off the chip's own USB port. |
| IO26 | GPIO26, SS, OTG D- | Default SPI SS for the SPI library. Full-speed USB OTG D-. |
| IO27 | GPIO27, OTG D+ | Full-speed USB OTG D+. |
| IO32 | GPIO32, MOSI | Default SPI MOSI for the SPI library. |
| IO33 | GPIO33, MISO | Default SPI MISO for the SPI library. |
| IO36 | GPIO36, SCK, STRAP | Default SPI SCK for the SPI library. Strapping pin: Boot mode: with GPIO35 low it must be high at reset for download mode. |
| IO37 | GPIO37, TX, STRAP | UART0 transmit: Serial output and the boot messages. Strapping pin: Sampled at reset; avoid driving it at power-up. |
| IO38 | GPIO38, RX, STRAP | UART0 receive: Serial input. Strapping pin: Sampled at reset; avoid driving it at power-up. |
| IO45 | GPIO45 | On the Function-EV board it switches the SD card power (low = on). |
| IO46 | GPIO46 | |
| IO47 | GPIO47 | |
| IO48 | GPIO48 | |
| IO53 | GPIO53, A12, ADC2_CH4 | Analog input: analogRead(A12) reads ADC2_CH4. |
| IO54 | GPIO54, A13, ADC2_CH5 | Analog input: analogRead(A13) reads ADC2_CH5. |
| 5V | 5V | 5 V supply: from USB, or from the regulator when the board is powered through VIN. |
| 5V | 5V | 5 V supply: from USB, or from the regulator when the board is powered through VIN. |
| GND | GND | Ground (0 V). |
| GND | GND | Ground (0 V). |
| GND | GND | Ground (0 V). |
| GND | GND | Ground (0 V). |
| GND | GND | Ground (0 V). |
| 3V3 | 3V3 | 3.3 V supply from the on-board regulator. Keep the load small. |
| GND | GND | Ground (0 V). |
| 3V3 | 3V3 | 3.3 V supply from the on-board regulator. Keep the load small. |
| GND | GND | Ground (0 V). |
| GND | GND | Ground (0 V). |
Good to know
- Pin numbers in code are GPIO numbers: digitalWrite(8, HIGH) drives GPIO8.
- The pins run at 3.3 V and are not 5 V tolerant. Each drives about 20 mA by default (40 mA at most).
- Any GPIO can do PWM (analogWrite() or ledcAttach()) and raise an interrupt (attachInterrupt()), and the GPIO matrix can route UART, I2C and SPI to almost any pin. The bus pins shown are the Arduino defaults.
- Strapping pins are read at reset to choose how the chip boots. The BOOT button pulls GPIO35 low; keep strapping pins free of loads that change their level at power-up.
- In the simulator, RST and NC connect to nothing.
- Arduino Uno pinout
- Arduino Nano pinout
- Arduino Mega pinout
- ATtiny85 pinout
- ESP32-C3 DevKitM-1 pinout
- ESP32-S3 DevKitC-1 pinout
- ESP32-C5 DevKitC-1 pinout
- ESP32-C6 DevKitC-1 pinout
- ESP32-H2 DevKitM-1 pinout
- Blue Pill (STM32F103C8) pinout
- Nucleo-F030R8 pinout
- Nucleo-G071RB pinout
- Nucleo-F401RE pinout
- Nucleo-F446RE pinout
- Nucleo-F767ZI pinout
- Nucleo-H743ZI2 pinout
- Nucleo-WBA55CG pinout
- Nucleo-L552ZE-Q pinout
- Black Pill (STM32F411CE) pinout
- Raspberry Pi Pico pinout
- Raspberry Pi Pico W pinout
- Raspberry Pi Pico 2 pinout
- Raspberry Pi Pico 2 W pinout