-
Notifications
You must be signed in to change notification settings - Fork 237
Description
Description
Environment
Board: Waveshare ESP32-S3-Touch-LCD-2.1" (ESP32-S3-WROOM-1-N16R8)
Display: ST7789V 240x320 (via HXR2002C21 controller)
ESP-IDF: v4.4.7
Retro-Go version: 1.46-9-g49b39-dirty
The display backlight turns on and the system boots successfully, but the screen remains completely black (no graphics displayed). The logs show that frames are being rendered (FPS:1, FPS:2) and the display is initialized successfully, but nothing appears on screen.
GPIO Pin Configuration
#define RG_GPIO_LCD_MOSI GPIO_NUM_38
#define RG_GPIO_LCD_CLK GPIO_NUM_39
#define RG_GPIO_LCD_CS GPIO_NUM_45
#define RG_GPIO_LCD_DC GPIO_NUM_42
#define RG_GPIO_LCD_BCKL GPIO_NUM_1
#define RG_GPIO_LCD_RST GPIO_NUM_0
These pins have been verified to be correct through successful testing with ESP-IDF's esp_lcd_panel_st7789 driver.
What Doesn't Work
- Retro-Go launcher shows black screen
- No graphics visible despite successful initialization
Log Output
[info] lcd_set_backlight: backlight set to 80%
[info] rg_display_init: Display ready.
[info] rg_system_init: Retro-Go ready.
[debug] STACK:5312, HEAP:283+7858 (252+7808), BUSY:0%, FPS:2 (S:2 R:0+0), BATT:0
Initialization Sequence Tried
Based on TFT_eSPI library and ST7789 datasheet, I've tried the following initialization sequence:
#define RG_SCREEN_INIT()
ILI9341_CMD(0xB6, 0x0A, 0x82); /* Display Function Control /
ILI9341_CMD(0xB0, 0x00, 0xE0); / RAMCTRL: RAM Control /
ILI9341_CMD(0xB2, 0x0C, 0x0C, 0x00, 0x33, 0x33); / Porch control /
ILI9341_CMD(0xB7, 0x35); / Gate control /
ILI9341_CMD(0xBB, 0x28); / VCOM setting /
ILI9341_CMD(0xC0, 0x0C); / LCM control /
ILI9341_CMD(0xC2, 0x01, 0xFF); / VDV and VRH enable /
ILI9341_CMD(0xC3, 0x10); / VRH set /
ILI9341_CMD(0xC4, 0x20); / VDV set /
ILI9341_CMD(0xC6, 0x0F); / Frame rate 60Hz /
ILI9341_CMD(0xD0, 0xA4, 0xA1); / Power control */
#define RG_SCREEN_WIDTH 240
#define RG_SCREEN_HEIGHT 320
#define RG_SCREEN_ROTATION 0
#define RG_SCREEN_RGB_BGR 0
Also modified ili9341.h to add:
Display Inversion ON (0x21) after Sleep Out (0x11)
CASET (0x2A) and RASET (0x2B) window initialization
120ms delay after Sleep Out
Things I've Tried
- Different MADCTL (0x36) rotation values (0-7)
- RGB vs BGR color mode (RG_SCREEN_RGB_BGR = 0 and 1)
- Display inversion ON (0x21) and OFF (0x20)
- RAMCTRL (0xB0) with parameters from TFT_eSPI (0x00, 0xE0)
- Complete ST7789V power control sequence
- CASET/RASET window initialization
- Different timing delays (10ms, 120ms after Sleep Out)
- Verified all GPIO pins match schematic
Hypothesis
Since the ESP-IDF official driver works but Retro-Go's custom SPI driver doesn't, the issue might be:
Difference in how pixel data is sent via SPI (byte ordering, endianness)
Missing SPI configuration flags
Data format conversion that ESP-IDF handles automatically
Question
Is there any known issue with ST7789V displays and Retro-Go's custom SPI driver? Are there any additional configuration steps needed beyond the standard initialization commands? The fact that frames are being rendered but not displayed suggests the LCD is receiving data but perhaps in the wrong format or the memory window isn't set up correctly for Retro-Go's drawing method.
Additional Information
Working test code using ESP-IDF: Uses esp_lcd_panel_st7789 with esp_lcd_panel_invert_color(panel_handle, true)
SPI configuration: SPI_MODE_0, 40MHz, MSB first
No compilation errors or warnings
Display controller responds to commands (backlight control works, no SPI errors)
Any guidance would be greatly appreciated!
Steps To Reproduce
No response
Environment
- Retro-Go:
- Device:
- OS:
- ESP-IDF:
Anything else?
No response