Skip to content

Black display on M5StackChan (board_t=27) with backlight on, panel detected but no render #199

@7H3-CH053N

Description

@7H3-CH053N

Summary

Running on a brand-new M5Stack StackChan (OpenELAB Kickstarter 2025 variant) the display stays completely black (backlight is on) when using a custom firmware that calls M5.begin(cfg) + M5.Display.fillScreen(...). The official xiaozhi-esp32-based firmware that ships with the device works fine, confirming the hardware is healthy.

The interesting part: M5GFX does detect the board correctly — M5.getBoard() returns 27 = board_M5StackChan. Display dimensions report correct (320x240). M5.Display.getPanel() returns a non-null pointer. setBrightness(255) runs. fillScreen(TFT_RED) returns without error. But the panel renders absolutely nothing.

Hardware

  • M5Stack StackChan, OpenELAB Kickstarter 2025 batch
  • CoreS3 module (ESP32-S3, 16MB Flash, 8MB PSRAM)
  • AXP2101 PMIC, AW9523 GPIO expander, PY32 / M5IOE1 expander, ILI9342 panel (panel ID 0xE3), GC0308 camera

Software

  • M5Unified 0.2.7, M5GFX bundled
  • platformio.ini: platform = espressif32@6.3.2, board = esp32s3box (no official m5stack-cores3 board file in this platform version), board_build.arduino.memory_type = qio_qspi, custom 16MB partition, -DBOARD_HAS_PSRAM, -DARDUINO_M5STACK_CORES3
  • Firmware: ronron-gh/AI_StackChan_Ex with a few local modifications

Reproduction

auto cfg = M5.config();
cfg.serial_baudrate = 115200;
M5.begin(cfg);
M5.Display.setBrightness(255);
M5.Display.fillScreen(TFT_RED);
Serial.printf("[BOOT] board=%d w=%d h=%d bright=%d panel=%p\n",
              (int)M5.getBoard(), M5.Display.width(), M5.Display.height(),
              M5.Display.getBrightness(), (void*)M5.Display.getPanel());

Serial output:

[BOOT] board=27 w=320 h=240 bright=255 panel=0x3fcec8f0

Display: black with backlight glow, visible from any angle and under direct flashlight. No content rendered at all.

What I tried (all without effect)

  1. M5.Display.init() after M5.begin(cfg)
  2. setRotation(1) plus startWrite()/endWrite() around fillScreen
  3. Manual LCD reset via AW9523 reg 0x03 bit 1 toggle (M5.In_I2C.bitOff(0x58, 0x03, 0x02, ...); delay; bitOn(...))
  4. setBrightness(255) to rule out brightness=0
  5. Verified getPanel() is non-null (so it isn't the SDL fallback)

What broke when changed

  • Switching board = esp32-s3-devkitc-1 → boot loop (RTC_SW_SYS_RST), likely partition/PSRAM mode mismatch with our 16MB custom CSV
  • Calling M5.begin() without cfg → boot loop
  • Adding m5stack/StackChan-BSP@^1.1.0 → build failure on this platform version (missing UART_SCLK_DEFAULT in older ESP-IDF and auto return-type errors needing C++17)

Question

The M5GFX autodetect at M5GFX.cpp lines 1448–1535 instantiates Panel_M5StackCoreS3 + Light_M5StackCoreS3 + Touch_M5StackCoreS3 for both board_M5StackCoreS3 and board_M5StackChan. Is the panel/light/power init for the M5StackChan variant supposed to differ from plain CoreS3? Specifically: is there a power rail, GPIO pin, or AW9523/PY32 register that the M5StackChan needs (and the official xiaozhi firmware sets) that the M5GFX init does not?

Happy to dump full boot logs, run additional diagnostics, or test fixes. Thanks for any pointers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions