Xinyuan-LilyGO / LilyGo-Display-IDF

This project is an esp-idf sample repository for the LilyGo display family.
MIT License
25 stars 7 forks source link

T-RGB 2.1 inch Half Circle: Trouble communicating with the screen #6

Closed arthurABDesign closed 3 months ago

arthurABDesign commented 7 months ago

Hello, I can't seem to communicate with the screen after flashing the default code on my T-RGB.

While monitoring I get:

I (1098) main: ------ Initialize I2C.
W (1098) i2c.master: Please check pull-up resistances whether be connected properly. Otherwise unexpected behavior would happen. For more detailed information, please read docs
I (1098) gpio: GPIO[8]| InputEn: 1| OutputEn: 1| OpenDrain: 1| Pullup: 0| Pulldown: 0| Intr:0 
I (1098) gpio: GPIO[48]| InputEn: 1| OutputEn: 1| OpenDrain: 1| Pullup: 0| Pulldown: 0| Intr:0 
I (1098) main: ------ Initialize PMU.
I (1098) main: ------ Initialize TOUCH.
I (1098) main: ------ Initialize DISPLAY.
I (1098) RGB: ============T-RGB==============
E (1098) i2c.master: i2c_master_transmit_receive(1041): i2c handle not initialized
E (1098) i2c.master: i2c_master_transmit_receive(1041): i2c handle not initialized
E (1118) i2c.master: i2c_master_transmit_receive(1041): i2c handle not initialized
I (1128) RGB: Extension BEGIN SPI SUCCESS !
E (1128) i2c.master: i2c_master_transmit_receive(1041): i2c handle not initialized
E (1128) i2c.master: i2c_master_transmit_receive(1041): i2c handle not initialized
E (1128) i2c.master: i2c_master_transmit_receive(1041): i2c handle not initialized
E (1128) i2c.master: i2c_master_transmit_receive(1041): i2c handle not initialized
E (1128) i2c.master: i2c_master_transmit_receive(1041): i2c handle not initialized
E (1128) i2c.master: i2c_master_transmit_receive(1041): i2c handle not initialized
E (1128) i2c.master: i2c_master_transmit_receive(1041): i2c handle not initialized
E (1128) i2c.master: i2c_master_transmit_receive(1041): i2c handle not initialized
E (1128) i2c.master: i2c_master_transmit_receive(1041): i2c handle not initialized
E (1128) i2c.master: i2c_master_transmit_receive(1041): i2c handle not initialized
E (1128) i2c.master: i2c_master_transmit_receive(1041): i2c handle not initialized
E (1128) i2c.master: i2c_master_transmit_receive(1041): i2c handle not initialized
E (1128) i2c.master: i2c_master_transmit_receive(1041): i2c handle not initialized

The i2c.master: i2c_master_transmit_receive(1041): i2c handle not initializedseems to come from the initialization of the screen in the display_rgb.cpp:

  int i = 0;
  while (init_cmd[i].len != 0xff) {
      writeCommand(init_cmd[i].addr);
      writeData(init_cmd[i].param, init_cmd[i].len & 0x1F);
      if (init_cmd[i].len & 0x80) {
          delay(100);
      }
      i++;
  }

After a lot of repetitions of that error, the program seems to run, but the LCD stay black except for the backlight who light.

E (2828) i2c.master: i2c_master_transmit_receive(1041): i2c handle not initialized
E (2828) i2c.master: i2c_master_transmit_receive(1041): i2c handle not initialized
E (2828) i2c.master: i2c_master_transmit_receive(1041): i2c handle not initialized
I (2948) RGB: Turn on LCD backlight
I (2948) gpio: GPIO[46]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (2948) main: Initialize LVGL library
I (2948) main: Register display driver to LVGL
I (2958) main: Install LVGL tick timer
I (2958) main: Register touch driver to LVGL
I (2958) main: Display LVGL
I (3248) main: Create LVGL task
I (3248) main_task: Returned from app_main()
I (3248) main: Starting LVGL task

Did you managed to get the T-RGB configuration to work ?

I'm on the last version of the code e458330 with the idf version ESP-IDF v5.3-dev-2815-gbe06a6f5ff.

Thanks

lewisxhe commented 3 months ago

The I2C error has been fixed. This is the touch screen going into sleep mode, I2C access error, but the screen not lighting up situation does not exist. My side is working normally.

arthurABDesign commented 3 months ago

Hello, the commit indeed fixed the issue. The screen is now working. Thanks