Help Needed - Waveshare 3.5" LCD (G) Connection Issues with ESP32

Hello,

I'm experiencing persistent issues connecting a Waveshare 3.5" RPi LCD (G) display (ST7796S driver with resistive touch) to a Freenove ESP32 WROOM board, and I'm hoping someone here can help me troubleshoot.

My Setup:

  • Display: Waveshare 3.5" RPi LCD (G) - 320x480, ST7796S driver, XPT2046 touch controller
  • Microcontroller: Freenove ESP32 WROOM Board
  • Library: TFT_eSPI (latest version)
  • Connection: SPI interface via Dupont wires

The Problem: The ESP32 consistently crashes immediately after calling tft.init(). The display backlight turns on successfully, indicating power is working, but the initialization never completes.

Serial Monitor Output:

Backlight: ON
LCD Reset: OK
Initializing SPI...
SPI: OK
Calling tft.init()...
ets Jul 29 2019 12:21:46
rst:0x8 (TG1WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[ESP32 reboot follows]

Pin Configuration (Current):

LCD Pin  →  ESP32 Pin
VCC      →  3.3V
GND      →  GND
MISO     →  GPIO19
MOSI     →  GPIO23
SCLK     →  GPIO18
LCD_CS   →  GPIO15
LCD_DC   →  GPIO22 (changed from GPIO2 to avoid strapping pin)
LCD_RST  →  GPIO4
LCD_BL   →  GPIO21
TP_CS    →  GPIO16
TP_IRQ   →  GPIO17

What I've Tried:

  1. Moved LCD_DC from GPIO2 (strapping pin) to GPIO22
  2. Reduced SPI frequency from 27MHz to 16MHz
  3. Added delays after reset and before initialization
  4. Disabled watchdog timer during initialization using disableCore0WDT() and disableCore1WDT()
  5. Manually initialized SPI bus with SPI.begin()
  6. Verified User_Setup.h configuration for ST7796_DRIVER
  7. Tried different rotation settings
  8. Checked physical connections multiple times - all have continuity

TFT_eSPI Configuration (User_Setup.h):

cpp

#define ST7796_DRIVER
#define TFT_MISO 19
#define TFT_MOSI 23
#define TFT_SCLK 18
#define TFT_CS   15
#define TFT_DC   22
#define TFT_RST   4
#define SPI_FREQUENCY  16000000


here the pins

Unfortunatly we see a lot of issues with these kinds of displays, I think they change monthly. Simply based on experience, if the crash happens at init, then the hardware and software are not matched. Finding out why is likely a fool's game, since fixing it will require deep library mods. Is there another library you can use? Always start with a sample sketch. Also, do a deep dive on the Waveshare site or email them to find a demo/sample sketch. Given your thoroughness at posting, I will assume you have the wiring correct, but it never hurts to check, maybe explain and show it to a 5-year-old or mailman, etc.