Skip to content

Problems with LCD on ESP32-S3-N4R8 with framework > v2.0.3 #8468

@benlye

Description

@benlye

Board

ESP32-S3-WROOM-1-N4R8

Device Description

Elecrow 7" ESP32 Display with ESP32-S3
https://www.elecrow.com/esp32-display-7-inch-hmi-display-rgb-tft-lcd-touch-screen-support-lvgl.html

Hardware Configuration

  • GPIO19 and GPIO20 are connected to an I2C touch screen
  • GPIO0, 3, 4, 5, 6, 7, 8, 9, 14, 15, 16, 21, 39, 40, 41, 45, 46 47, 48 are connected to an RGB LCD

Version

latest master (checkout manually)

IDE Name

Arduino IDE and PlatformIO

Operating System

Windows 11

Flash frequency

80MHz

PSRAM enabled

yes

Upload speed

921600

Description

I'm using the Arduino_GFX graphics library to drive the LCD screen. The display works fine if I use Arduino ESP32 v2.0.3, but v2.0.4 or newer causes the screen to display very strangely - it fades to light grey and occasionally shows a faded-out version of what should be on it.

I've tracked the change where the screen stops working properly to 666c66d, where the Espressif IDF was updated to v4.4. Obviously this is a very large update with a lot of changes.

I appreciate that this is most likely something that will need fixing in the Arduino_GFX graphics library, but I'm looking for any pointers towards anything I can do to try to figure this out so I can get this device / library to work with newer framework versions. The library itself works fine with other ESP32S3 display devices, including other RGB displays.

Sketch

#include <Arduino_GFX_Library.h>

#define TFT_BL 2

Arduino_ESP32RGBPanel *rgbpanel = new Arduino_ESP32RGBPanel(
  41 /* DE */, 40 /* VSYNC */, 39 /* HSYNC */, 0 /* PCLK */,
  14 /* R0 */, 21 /* R1 */, 47 /* R2 */, 48 /* R3 */, 45 /* R4 */,
   9 /* G0 */, 46 /* G1 */,  3 /* G2 */,  8 /* G3 */, 16 /* G4 */, 1 /* G5 */,
  15 /* B0 */,  7 /* B1 */,  6 /* B2 */,  5 /* B3 */,  4 /* B4 */,
   0 /* hsync_polarity */, 210 /* hsync_front_porch */, 30 /* hsync_pulse_width */, 16 /* hsync_back_porch */,
   0 /* vsync_polarity */,  22 /* vsync_front_porch */, 13 /* vsync_pulse_width */, 10 /* vsync_back_porch */,
   1 /* pclk_active_neg */, 16000000 /* prefer_speed */
);
Arduino_RGB_Display *gfx = new Arduino_RGB_Display(
    800 /* width */, 480 /* height */, rgbpanel, 0 /* rotation */, true /* auto_flush */
);

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200); // Init Display

  pinMode(TFT_BL, OUTPUT);
  digitalWrite(TFT_BL, HIGH);

  lcd->begin();
  lcd->fillScreen(BLACK);
}

void loop() {
  // put your main code here, to run repeatedly:
  lcd->fillScreen(RED);
  delay(2000);
  lcd->fillScreen(GREEN);
  delay(2000);
  lcd->fillScreen(BLUE);
  delay(2000);
  lcd->fillScreen(BLACK);
  delay(2000);
}

Debug Message

N/A

Other Steps to Reproduce

I've tried PlatformIO and the Arduino IDE and both behave the same - v2.0.3 works, anything newer and the display stops working.

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions