Waveshare ESP32-P4-WIFI6-Touch-LCD-3.5
3.5" 320x480 IPS LCD (ST7796, SPI), FT6336 touch, ES8311 audio, TF card, AXP2101, Wi-Fi through its ESP32-C6.

Affiliate link: LCD Wizard may earn a commission if you buy through it.
Building for it
A project is made for one toolchain, picked when you start it. For this board you can use two of the four:
| Toolchain | |
|---|---|
| Arduino (C++) | Every board, every widget and every peripheral here. The most control, and the most to set up. Start a project |
| MicroPython | The MicroPython export has not been built for this chip yet. It is written for the ESP32, S2, S3, C3 and C6. |
| ESPHome | The ESP32-P4 is only useful here with a MIPI-DSI panel, which this export does not write yet. |
| ESP-IDF (C) | Espressif's own framework: esp_lcd, the component registry and idf.py, with nothing of Arduino in it. Start a project |
Wi-Fi: the ESP32-C6 beside the P4
The ESP32-P4 has no radio. This board’s Wi-Fi is an ESP32-C6 on the P4’s SDIO lines running Espressif’s ESP-Hosted, which has to be the release the ESP32 core was built with (2.12.11 for the core LCD Wizard exports for). A C6 as it leaves the factory may run an older one: the serial port then says ESP-Hosted of an unknown version, and Wi-Fi can fail or freeze the board as it starts. Update my C6 writes 2.12.11 to it from the browser, with no Wi-Fi and no password. Why, and how to update the C6.
- Not yet run on this board by us. The updater is built from this board’s preset and compiled, but we have not run it on one ourselves. It writes nothing until you press Start update on the board’s screen and confirm.
- An older C6 may have to be flashed by hand. One whose ESP-Hosted is too old to take an update over the link refuses it, and nothing is written; it is then flashed through its own UART, as the board’s maker describes (how).
At a glance
| Part | Detail |
|---|---|
| Maker | Waveshare |
| MCU | ESP32-P4 RISC-V dual-core @ 400 MHz, 768 KB SRAM (+ PSRAM) |
| Display | Sitronix ST7796 / ST7796S, 320 x 480 px, SPI (4-wire serial), 16-bit colour |
| Touch | FocalTech FT6236 / FT6336U (capacitive, I2C) |
| Backlight | GPIO 28, dimmable (PWM) |
| Memory | 16 MB flash, 32 MB PSRAM (N16R32) |
| Graphics library | GFX Library for Arduino |
Display pins
ST7796 / ST7796S on SPI (4-wire serial): SPI clock 80 MHz, host SPI2_HOST, BGR colour order, inversion on.
| Signal | Pin |
|---|---|
| SCK / CLK | GPIO 21 |
| MOSI / SDA | GPIO 20 |
| CS | GPIO 23 |
| DC / RS | GPIO 26 |
| RESET | GPIO 27 |
| Backlight | GPIO 28 |
Touch pins
FT6236 / FT6336U: I2C address 0x38, 400 kHz, shares the display bus.
| Signal | Pin |
|---|---|
| SDA | GPIO 7 |
| SCL | GPIO 8 |
| INT / IRQ | GPIO 50 |
| RESET | GPIO 29 |
Also on the board
- I2C (GPIO 7 / 8) - SDA GPIO 7, SCL GPIO 8
- SDCard - SD card, CLK GPIO 43, CMD GPIO 44, D0 GPIO 39, D1 GPIO 40, D2 GPIO 41, D3 GPIO 42
- PMICbatterycharger - AXP2101, at 0x34, on I2C (GPIO 7 / 8)
- WiFiCoprocessor - Wi-Fi co-processor, CLK GPIO 18, CMD GPIO 19, D0 GPIO 14, D1 GPIO 15, D2 GPIO 16, D3 GPIO 17, RST GPIO 54
The ESP32-C6 beside the P4 is this board's Wi-Fi, taken to be on the ESP32 core's own SDIO lines for the P4: Waveshare publish no pins for it, and their own Arduino Wi-Fi example uses no others. It must run ESP-Hosted of the core's release (the README says how to tell). If the board says the co-processor is not answering, the lines are the first thing to doubt. - BOOTButton - input on GPIO 35
The preset adds these to the Hardware tab with the board, so a sensor can go straight onto the connector.
Check your revision. Pins from Waveshare's demo code and schematic (https://github.com/waveshareteam/ESP32-P4-WIFI6-Touch-LCD-3.5). BSP comment says touch reset is 'Shared with LCD reset' but its own define and the schematic give TP_RST = GPIO29, separate from LCD_RST GPIO27; chose 29. Sound: the ES8311 at 0x18 on I2C 7/8, I2S MCLK 13, BCLK 12, WS 10, data to the codec 9 and the microphone back on 11, speaker amplifier on GPIO 53 (on when high), from Waveshare's lcd35_board.h and the BSP header (pa_reverted false). Compiled; not heard on a board. Wi-Fi is the ESP32-C6 (a bare ESP32-C6FH8) beside the P4, in the kit as the Wi-Fi co-processor on the ESP32 core's own SDIO lines (CLK 18, CMD 19, D0-D3 14-17, reset 54): Waveshare publish no pins for it and their own Arduino Wi-Fi example uses those defaults; the schematic, read for this preset, puts the C6's SDIO among GPIO 14-19 and its CHIP_PU on GPIO 54 through a 0 ohm link, and the order of the six lines is the defaults' by inference. It has to run ESP-Hosted of the core's release, which the board prints at start (see the README). Wi-Fi through it compiles and has not been on a board. Not driven: the C6's Bluetooth; ESP-NOW does not go through the C6. A design on this preset starts on revision 3 of the ESP32-P4, which Waveshare's own Arduino examples for their P4 boards build for; for a chip before revision 3 (the upload says "revision v1.x"), choose that under Hardware > Board > Chip revision.
Designing for it in LCD Wizard
- Choose Waveshare ESP32-P4-WIFI6-Touch-LCD-3.5 on the Hardware tab (or use the button above) and every pin on this page is filled in. The export writes the sketch,
lcd_pins.h, the GFX Library for Arduino configuration,lv_conf.handplatformio.ini- a project that builds for this board as it comes. - The FT6236 / FT6336U is capacitive and needs no calibration. The firmware resets it and checks it answers on every boot.
- The backlight is dimmable: give a slider or a button a Set backlight action.
- With PSRAM the LVGL memory pool can live there, leaving internal RAM for everything else.
- Screens are designed for 320 x 480 px in either orientation, with LVGL 9 or LVGL 8.
The parts
ST7796 / ST7796S. The usual 4.0" 320x480 controller. Faster than ILI9488 over SPI (true RGB565).
FT6236 / FT6336U. Register-compatible with the FT6206. Very common on 2.8"-3.5" capacitive TFTs.
ESP32-P4. Has a MIPI-DSI host and a 2D graphics accelerator (PPA). Arduino core support is newer - verify your core version.
GFX Library for Arduino. Moshi Liu's library. Best QSPI/AMOLED and RGB coverage. Configured in code.
The pinout on one page
Every pin above, laid out to print and keep beside the bench. Generated from this preset, so it says exactly what the designer writes into lcd_pins.h.
Download the pinout (PNG)Open it as SVG
The same pins as data - board.json and pins.csv - are in the open pinout dataset on GitHub, free to reuse under CC BY 4.0.
From the people who made it
The board’s own documentation. Pinouts on vendor pages do sometimes disagree with the hardware in front of you - where this page and that one differ, trust your board and tell us.
- The vendor’s product page
- Vendor documentation
- Schematic (PDF)
- Waveshare demo code (pins read from here)
Designs for this board
Nobody has published a design for this board yet. Publish yours from the designer and it appears here and in the gallery.
From the blog
Similar boards
Next
- Quick start - from an empty screen to firmware on the board
- Boards and displays - presets, controllers, pins and touch in the designer
- Flashing and configuration - PlatformIO, the Arduino IDE and first-boot checks
- Troubleshooting - a white screen, mirrored image or touch that misses