Simvik

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

PinFunctionsNotes
IO0GPIO0
IO1GPIO1
IO2GPIO2, T0, MTCKCapacitive touch: touchRead(T0). JTAG MTCK when JTAG is taken from the pins instead of USB.
IO3GPIO3, T1, MTDICapacitive touch: touchRead(T1). JTAG MTDI when JTAG is taken from the pins instead of USB.
IO4GPIO4, T2, MTMSCapacitive touch: touchRead(T2). JTAG MTMS when JTAG is taken from the pins instead of USB.
IO5GPIO5, T3, MTDOCapacitive touch: touchRead(T3). JTAG MTDO when JTAG is taken from the pins instead of USB.
IO6GPIO6, T4Capacitive touch: touchRead(T4).
IO7GPIO7, T5, SDACapacitive touch: touchRead(T5). Default I2C SDA for Wire.
IO8GPIO8, T6, SCLCapacitive touch: touchRead(T6). Default I2C SCL for Wire.
IO20GPIO20, A4, ADC1_CH4Analog input: analogRead(A4) reads ADC1_CH4.
IO21GPIO21, A5, ADC1_CH5Analog input: analogRead(A5) reads ADC1_CH5.
IO22GPIO22, A6, ADC1_CH6Analog input: analogRead(A6) reads ADC1_CH6.
IO23GPIO23, A7, ADC1_CH7Analog input: analogRead(A7) reads ADC1_CH7.
IO24GPIO24, USB D-USB Serial/JTAG D-. Using it as a GPIO turns off the chip's own USB port.
IO25GPIO25, USB D+USB Serial/JTAG D+. Using it as a GPIO turns off the chip's own USB port.
IO26GPIO26, SS, OTG D-Default SPI SS for the SPI library. Full-speed USB OTG D-.
IO27GPIO27, OTG D+Full-speed USB OTG D+.
IO32GPIO32, MOSIDefault SPI MOSI for the SPI library.
IO33GPIO33, MISODefault SPI MISO for the SPI library.
IO36GPIO36, SCK, STRAPDefault SPI SCK for the SPI library. Strapping pin: Boot mode: with GPIO35 low it must be high at reset for download mode.
IO37GPIO37, TX, STRAPUART0 transmit: Serial output and the boot messages. Strapping pin: Sampled at reset; avoid driving it at power-up.
IO38GPIO38, RX, STRAPUART0 receive: Serial input. Strapping pin: Sampled at reset; avoid driving it at power-up.
IO45GPIO45On the Function-EV board it switches the SD card power (low = on).
IO46GPIO46
IO47GPIO47
IO48GPIO48
IO53GPIO53, A12, ADC2_CH4Analog input: analogRead(A12) reads ADC2_CH4.
IO54GPIO54, A13, ADC2_CH5Analog input: analogRead(A13) reads ADC2_CH5.
5V5V5 V supply: from USB, or from the regulator when the board is powered through VIN.
5V5V5 V supply: from USB, or from the regulator when the board is powered through VIN.
GNDGNDGround (0 V).
GNDGNDGround (0 V).
GNDGNDGround (0 V).
GNDGNDGround (0 V).
GNDGNDGround (0 V).
3V33V33.3 V supply from the on-board regulator. Keep the load small.
GNDGNDGround (0 V).
3V33V33.3 V supply from the on-board regulator. Keep the load small.
GNDGNDGround (0 V).
GNDGNDGround (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.