M5Stack Tab5 (ESP32-P4, 5" 720x1280)
5" 720x1280 MIPI-DSI panel on an ESP32-P4 with an ESP32-C6 for Wi-Fi. Any of the three panels the Tab5 has shipped with (ILI9881C, ST7123, ST7121) is found at start, as M5Stack's own firmware does. Compiled, not yet seen on a board.

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 | M5Stack |
| MCU | ESP32-P4 RISC-V dual-core @ 400 MHz, 768 KB SRAM (+ PSRAM) |
| Display | Ilitek ILI9881C, 720 x 1280 px, MIPI-DSI, 16-bit colour |
| Touch | M5Stack M5Stack Tab5 touch (GT911 or ST7123, as the panel) (capacitive, I2C) |
| Backlight | GPIO 22, dimmable (PWM) |
| Memory | 16 MB flash, 32 MB PSRAM (N16R32) |
| Graphics library | GFX Library for Arduino |
Display pins
ILI9881C on MIPI-DSI: RGB colour order, inversion off.
| Signal | Pin |
|---|---|
| RESET | not connected |
| Backlight | GPIO 22 |
Touch pins
M5Stack Tab5 touch (GT911 or ST7123, as the panel): I2C address 0x14, 400 kHz, shares the display bus.
| Signal | Pin |
|---|---|
| SDA | GPIO 31 |
| SCL | GPIO 32 |
| INT / IRQ | GPIO 23 |
| RESET | not connected |
Also on the board
- Internal I2C (GPIO 31 / 32) - SDA GPIO 31, SCL GPIO 32
- Port A (Grove, GPIO 53 / 54) - SDA GPIO 53, SCL GPIO 54
- IOE1 I/O expander at 0x43, driving the lines marked above
- IOE2 I/O expander at 0x44, driving the lines marked above
- WiFiCoprocessor - Wi-Fi co-processor, CLK GPIO 12, CMD GPIO 13, D0 GPIO 11, D1 GPIO 10, D2 GPIO 9, D3 GPIO 8, RST GPIO 15
The ESP32-C6 beside the P4 is this board's Wi-Fi, on SDIO CLK 12, CMD 13, D0-D3 11 / 10 / 9 / 8 and its reset on GPIO 15 (active low), 4-bit at 40 MHz, as M5Stack's own firmware has it. The C6 is powered from the second I/O expander, which the start-up switches on. The Tab5 leaves the factory with ESP-Hosted 1.4.1 on its C6; it must run ESP-Hosted of the core's release (the README says how to tell). - SDCard - SD card, CLK GPIO 43, CMD GPIO 44, D0 GPIO 39, D1 GPIO 40, D2 GPIO 41, D3 GPIO 42
The TF card slot, on SDMMC 4-bit (CLK 43, CMD 44, D0-D3 39-42), powered from the chip's LDO channel 4, as M5Stack's BSP has it (bsp_sdcard_init). - IMU - MPU6886 / BMI270, at 0x68, on Internal I2C (GPIO 31 / 32) (arrives switched off in a new design)
The BMI270 motion sensor on the internal bus, as M5Unified reads it. Switched off as it arrives: switch it on to read it. - Clock - RX8130CE, at 0x32, on Internal I2C (GPIO 31 / 32) (arrives switched off in a new design)
The RX8130CE clock, kept going by the board's backup, charged as M5Unified charges it (on a Tab5, not on a Tab5X). - Battery - INA226, at 0x41, on Internal I2C (GPIO 31 / 32) (arrives switched off in a new design)
The INA226 on the battery: its voltage, and the current in or out through a 5 milliohm shunt, as M5Unified sets it up (16 samples, up to 2 A). - RS485 - RS485 / Modbus RTU, TX GPIO 20, RX GPIO 21, DE GPIO 34 (arrives switched off in a new design)
The RS485 terminal: TX 20, RX 21, direction 34, as M5Stack's own firmware drives it (hal_rs485.cpp, UART1, half duplex). - Camera - Camera on the MIPI connector, on Internal I2C (GPIO 31 / 32) (arrives switched off in a new design)
The 2 MP SC202CS (SC2356) camera on the MIPI connector. GPIO 36 is not driven: on a board the camera gave pictures with it never started, and M5Stack's own firmware leaves it on the backlight's 5 kHz timer by the time its camera runs. Its control lines are the internal bus at 400 kHz, as M5Stack's own firmware starts it (bsp_cam_osc_init, hal_camera.cpp); the picture on the screen is mirrored and turned 90 degrees anticlockwise by the PPA, as theirs is (their camera task mirrors it; their screen is turned 90), and pictures and the stream are as the sensor sends them. - Headphones - input on IOE1 pin 7
- Charge Status - input on IOE2 pin 6
The preset adds these to the Hardware tab with the board, so a sensor can go straight onto the connector.
Check your revision. Nobody at LCD Wizard has had this board: the export for it compiles and has not been seen on the panel. The Tab5 has been sold with three panels - an ILI9881C with a GT911 touch chip, an ST7123 and an ST7121 - and the export starts the one your board has exactly as M5Stack's own factory firmware does: the two I/O expanders, the touch chip's reset, which panel it is (asked of the touch chip), then that panel with M5Stack's own driver and settings. The serial monitor says which panel it found ("panel: M5Stack Tab5 with its ... panel"). The backlight is GPIO 22 at 5 kHz. The ESP32-C6 is the board's Wi-Fi, on the pins M5Stack's firmware uses; it leaves the factory with an older ESP-Hosted, so Wi-Fi may need the C6 updated (the README says how). A design on this preset builds for an ESP32-P4 before revision 3, as M5Stack's firmware does; if the upload reports revision 3 ("revision v3.x"), choose that under Hardware > Board > Chip revision. In the kit, as M5Stack's own code starts each: the ES8388 speaker codec (amplifier on IOE1 P1) and the ES7210 microphones, the BMI270 IMU, the RX8130CE clock, the INA226 battery monitor, RS485 (TX 20, RX 21, direction 34), the TF card and the camera (an SC202CS, its clock on GPIO 36), switched off but for the card and the C6; Port A (Grove) is I2C on GPIO 53 / 54, its 5 V IOE1 P2. Not driven: the USB-A host port, the charger's controls, the HAT header and the keyboard connector.
Designing for it in LCD Wizard
- Choose M5Stack Tab5 (ESP32-P4, 5" 720x1280) 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 M5Stack Tab5 touch (GT911 or ST7123, as the panel) 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.
- The MIPI-DSI panel stays on while settings or files are saved: the Arduino export keeps the frame running through flash writes, which otherwise blank an ESP32-P4 screen.
- Screens are designed for 720 x 1280 px in either orientation, with LVGL 9 or LVGL 8.
The parts
ILI9881C. ESP32-P4 only, with PSRAM. Driven under a maker's own register load: Waveshare's 7" 720x1280 (7-DSI-TOUCH-A). Compiled, not yet seen on a board.
M5Stack Tab5 touch (GT911 or ST7123, as the panel). The M5Stack Tab5 only: which chip it is, is found at start with the panel (the start-up sequence "M5Stack Tab5 factory firmware").
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
- m5stack/M5Tab5-UserDemo, the factory firmware (vendor GitHub)
- m5stack/M5GFX and M5Unified, M5Stack's Arduino libraries (vendor GitHub)
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.
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
- ESP32-P4 screen flickers when writing flash - NVS, LittleFS and OTA writes: the cause and the fix