Skip to content

M5Stack Tab5 (m5stack-tab5, chip rev v1.3): ST7123 display init succeeds but panel stays black #2186

Description

@otreb

Summary

M5Stack Tab5 (m5stack-tab5 board variant, Rev < 3 chip) boots and runs correctly — WiFi, audio (I2S/ES8388), touch, camera, and backlight all confirmed working — but the ST7123 MIPI-DSI display never actually renders anything. The backlight turns on, the driver logs a fully successful init sequence, but the panel stays black.

Hardware

  • M5Stack Tab5, ESP32-P4 chip revision v1.3 (confirmed via esptool chip-id)
  • Board variant built: m5stack-tab5 (not -p4x), per the board README's own Rev<3 guidance
  • Confirmed the physical unit/panel is not faulty: M5Stack's own M5Tab5-UserDemo factory firmware renders correctly on this exact unit

What was tried

  1. ESP-IDF v6.0.2 (recommended in the board README): boots but hard-crashes at esp_startup_start_app app_startup.c:83 (res == pdTRUE) — traced to the SDIO transport buffer pool for the onboard ESP32-C6 (WiFi co-processor) exhausting internal RAM. Fixed by setting CONFIG_ESP_HOSTED_MEMPOOL_PREFER_SPIRAM=y (this option already exists in the bundled espressif__esp_hosted component's Kconfig, just defaults to off). After this fix, boot succeeds cleanly and the device is fully functional except for the display.
  2. Also tried ESP-IDF v5.5.5 to sidestep the above — no crash, but this hit the known display bug tracked in M5Stack Tab5 (ESP32-P4) DSI issues on ESP-IDF v5.5.X (IDFGH-17043) espressif/esp-idf#18083 (blank/garbled screen on v5.5.x). Went back to v6.0.2 + the mempool fix instead, since that's a clean fix rather than a version dodge.
  3. Compared main/boards/m5stack/tab5/config.h's st7123_vendor_specific_init_default[] byte-for-byte against M5Stack's own working init table in M5Tab5-UserDemoidentical, command-for-command, byte-for-byte.
  4. Compared the DPI video timing config (h_size/v_size/porches/pulse widths, dpi_clock_freq_mhz, lane_bit_rate_mbps) against the same UserDemo reference — identical.
  5. UserDemo sets .flags = { .use_dma2d = true } on esp_lcd_dpi_panel_config_t; that field doesn't exist in this project's pinned ESP-IDF v6.0.2 (esp_lcd_mipi_dsi.h only has disable_lp), so it's not portable as-is — UserDemo is evidently built against a different/newer esp_lcd API.
  6. Tried dpi_config.num_fbs = 2 (a fix that resolved a similar-sounding ESPHome ST7123 issue) — no change.
  7. Tried dpi_config.flags.disable_lp = 1 (disabling low-power mode during DPI video transmission, since continuous LP/HS switching is a plausible cause of "driver reports success, panel shows nothing") — no change.
  8. Full power-cycle (unplug/replug USB, not just soft reset) tried at multiple points, since some DSI PHY/LDO state doesn't reinitialize on soft reset — no change.

Current state

Everything is initialized without error at the log level (ST7123 Display initialized with resolution 720x1280, Touch panel create success, Backlight: Set brightness to 75), but the physical panel never displays anything — confirmed on real hardware, backlight on, screen black, across every tested ESP-IDF version and every config permutation tried above.

Given the init bytes and timing are verified identical to a known-working reference build, the remaining bug is most likely in the vendored esp_lcd_st7123.c driver's actual init/reset/DBI-transaction sequencing logic (order of operations, timing between esp_lcd_panel_reset and esp_lcd_panel_init, or something in how DBI commands are transmitted relative to DPI video start) rather than anything tunable from the board config file.

Environment

  • ESP-IDF v6.0.2
  • xiaozhi-esp32 main branch, board m5stack/tab5, variant m5stack-tab5
  • macOS (Apple Silicon shouldn't be relevant here, host toolchain only)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions