Skip to content

ESP32-C5-WROOM-1/1U (N32R8) Unfunctional with 2.8" ILI9341 TFT #2617

Closed as not planned

Description

@J-Hou-ss

(sorry this is AI generated i'm not smart enough to have a notion what i'm at, however proof read and all accurate)
TFT is working and not defective btw

Describe the bug:

TFT display (ILI9341 SPI, 320x240, with XPT2046 touch) on the official esp32-c5-tft board profile stays solid white with backlight on, regardless of what is drawn to it. This occurs even when driving the panel through a completely independent, from-scratch driver written directly against ESP-IDF's spi_master API (bypassing TFT_eSPI and Arduino's SPIClass entirely), with zero errors reported by the SPI driver at any point. Wiring continuity, power delivery, and display health have all been independently verified. A different display controller (ST7789) on this same board profile was independently reported with an identical symptom in #2398.

Steps To Reproduce:

Device used: ESP32-C5-WROOM-1U (N32R8: 32MB flash, 8MB embedded PSRAM), Waveshare dev board, official Bruce esp32-c5-tft board profile. 2.8" ILI9341 SPI TFT + XPT2046 touch module ("TPM408-2.8"). Reproduced on two separate physical units of this exact board.
Build: pioarduino platform-espressif32 55.03.36, framework-arduinoespressif32-libs 5.5.0 (Bruce's custom esp32-arduino-lib-builder build, idf-release_v5.5). Chip reports as ESP32-C5 (revision v1.2), ESP-ROM:esp32c5-eco3-20250704.

Actual behaviour:
Backlight turns on; display panel stays solid white continuously. No crash, no exception, no watchdog reset — serial log is clean throughout and the firmware runs normally all the way into the main loop (WiFi task, etc.). At most a sub-second, partial-screen flicker is visible during boot; no sustained colour change is ever observed, even when the firmware is instrumented to cycle the full screen through red/green/blue/yellow/cyan/magenta with multi-second holds at each stage.

Additional context / logs:

Hardware eliminated:

Wiring re-verified against the official pinout twice, then independently re-verified via multimeter continuity test (board fully powered off) across all seven relevant lines individually: SCK(GPIO6), MOSI(GPIO7), MISO(GPIO2), CS(GPIO23), DC(GPIO24), RST, BL(GPIO25) — all confirmed continuous, no opens.
Power confirmed: 3.3V measured directly across the display's VCC/GND pins.
Display panel confirmed functional independently (separate test, prior to this session).
Board defect ruled out: identical symptom reproduced on two separate physical ESP32-C5-WROOM-1U / 1 units.
Driver mismatch ruled out: confirmed genuine ILI9341 (ILI9341_DRIVER in pins_arduino.h).
USB power source varied: PC USB2.0 port produced a brief white/black flicker pattern (consistent with power-rail sag from WiFi/BT/PSRAM init competing with display current draw); switching to a PC USB3.0 port eliminated the flicker but display remained solid white — ruling out simple port current-limiting as the root cause.
Software bit-banged SPI (manual GPIO toggling, no hardware SPI peripheral) also fails identically — rules out a hardware-SPI-peripheral-specific bug.
Caveat on the above: the previously-tried "dedicated RST pin" hardware test used GPIO15. We subsequently discovered (Espressif ESP32-C5-WROOM-1/1U datasheet) that GPIO15 is internally wired as SPICS1 for this module's embedded PSRAM and is not a usable GPIO — meaning that test never actually toggled a wire connected to the display at all. A genuinely dedicated, free-GPIO RST line (bypassing the shared board-reset net) has not yet been validly tested.
Software-level fixes applied during this investigation:

Reverted TFT_RST from GPIO15 back to -1 in pins_arduino.h (GPIO15/PSRAM conflict above; unrelated to the white-screen root cause but a real latent bug — every tft.init() was pulsing the PSRAM chip-select).
Confirmed the explicit SPI.begin(TFT_SCLK, TFT_MISO, TFT_MOSI, TFT_CS) in _setup_gpio() is redundant (TFT_eSPI's own init() already calls it) but harmless.
SPI_FREQUENCY/SPI_READ_FREQUENCY tested at both 2MHz and 20MHz — no change in behaviour either way.
Source-level audit (all confirmed correct, not the cause):

Bruce vendors a genuine, dedicated ESP32-C5 processor file (lib/TFT_eSPI/Processors/TFT_eSPI_ESP32_C5.c/.h), not a renamed C3 file.
The known ESP32-C5 SPI_UPDATE double-buffered-register quirk is correctly implemented in every raw-register write path: pushBlock, pushPixels, pushSwapBytePixels, and the tft_Write_8/16/32 macros (TFT_WRITE_BITS).
Note: tft_Read_8() (= spi.transfer(0)) goes through Arduino's SPIClass/esp32-hal-spi.c instead, which has no SPI_UPDATE handling — register readback (RDDPM/RDDID/RDID4) is consequently unreliable (returned different garbage across attempts: 0x00, then 0xFF, then 0x00) and should not be treated as a trustworthy diagnostic signal for this chip. This is a separate, real bug in its own right, but is not shown to be related to the white-screen issue.
Progressively deeper isolation tests (all still produced a solid white screen):

Full Bruce boot, unmodified.
Boot instrumented with fillScreen() calls in six distinct colours (black/green/blue/yellow/cyan/magenta) at every major boot-sequence checkpoint, each held 2-3 seconds, logged over Serial0 (UART0, not the native-USB Serial, to rule out a logging blind spot) — confirmed via log timestamps that every stage executed in sequence with correct timing; screen never visibly changed.
setup() stripped to bypass every other Bruce subsystem (no WiFi, BLE, storage, touch, theme, or background tasks) — just setup_gpio() + tft.init() + an infinite fillScreen(RED/GREEN/BLUE) loop via TFT_eSPI. Confirmed via serial log that this looped correctly. Screen: still solid white.
Ground-up rewrite bypassing TFT_eSPI and Arduino's SPIClass entirely: a new minimal driver built directly on ESP-IDF's spi_master API (spi_bus_initialize, spi_bus_add_device, spi_device_polling_transmit), manually issuing the ILI9341 init sequence (SWRESET/SLPOUT/COLMOD/MADCTL/DISPON) and a raw pixel fill. spi_bus_initialize and spi_bus_add_device both returned ESP_OK; every fill transaction across many RED/GREEN/BLUE cycles completed with zero reported errors. Screen: still solid white.
Ruled out tft.calibrateTouch()'s unconditional blocking loop (Extensions/Touch.cpp:270, while(!validTouch(...));, no timeout) as a boot-hang cause — confirmed via staged logging that boot proceeds past this point normally and reaches the main loop.

Activity

  1. github-actions commented on Jul 24, 2026

    @github-actions

    This issue has been automatically marked as stale due to inactivity. It will be closed in 5 days unless there is further activity.

  2. github-actions commented on Jul 29, 2026

    @github-actions

    Closing due to prolonged inactivity. If this is still relevant, please comment or open a new issue with updated details.

  3. vitoremanuelpedrosoconrado-ops commented on Sep 27, 2026

    @vitoremanuelpedrosoconrado-ops

    Se precisar eu ajudo

  4. J-Hou-ss commented on Nov 13, 2026

    @J-Hou-ss
    Author

    Found the cause, posting in case anyone else lands here with the same white screen.

    On the Waveshare ESP32-C5-WIFI6-KIT, GPIO6 is the battery-sense input, and that net has 100 nF capacitors to GND. Bruce's esp32-c5-tft profile puts the screen's SPI clock on GPIO6 (still true in 1.17), so the clock gets smoothed away and never reaches the screen. That's why everything above looked fine: backlight on, no SPI errors, solid white.

    The fix is to move the screen to the pins from Waveshare's own ILI9341 demo: SCK 1, MOSI 2, MISO 7, CS 5, DC 3, RST 4, touch CS 23, and GPIO6 only for the backlight (a steady level is fine on it).

    Ready-to-flash build for this kit with a 2.8" ILI9341 touch screen, with the wiring table, flash steps and source:
    https://github.com/J-Hou-ss/bruce-waveshare-esp32-c5-ili9341-touch

    I've also opened #3083 to add the board to Bruce officially.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions