Gisbert 12843
Gisbert 12843

Reputation: 11

ESP32 / ESPIDF I2C Touchscreen Driver (GT911) usage with i8080 + lvgl

Situation: I am working on an ESP32 Project for about 4 months now using this display and an ESP32 Dev Kit C V1 (not the newer one). All of that as mentioned in the ESPIDF. The Display uses an ILI9488 driver via an 8bit parallel connection which i got to a working condition displaying a button with lvgl 8.3 a week ago.

Problem: I need to get the touch screen driver (GT911) working but am struggling to find a decent actually working library (esp_lcd_touch_gt911 e.g. just does not seem to work even after many sleepless nights) or establishing an i2c connection for it in the first place. Sadly the documentation for this specific case is all over the place and google searches regarding any reported errors result in 0 results.

What I am currently using and seems to bring my the furthest till now, is to use the

gt911.h

provided by the lvgl_drivers repository, which is not mentioned as supported but it seems to be rather done.

My current code state looks like this: tft.h

touch.h

main.cpp

Current Error Code looks like this:

I (5421) LCD: Install LCD driver of ili9488
I (5426) gpio: GPIO[32]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (5435) ili9488: Configuring for BGR color order
I (5440) ili9488: new ili9488 panel @0x3ffc0ff8
I (5446) ili9488: Setting GPIO:32 to 0
I (5460) ili9488: Setting GPIO:32 to 1
I (5470) ili9488: Initializing ILI9488
D (5470) ili9488: Sending CMD: e0, len: 15
D (5470) ili9488: Sending CMD: e1, len: 15
D (5471) ili9488: Sending CMD: c0, len: 2
D (5476) ili9488: Sending CMD: c1, len: 1
D (5480) ili9488: Sending CMD: c5, len: 3
D (5484) ili9488: Sending CMD: 36, len: 1
D (5488) ili9488: Sending CMD: 3a, len: 1
D (5492) ili9488: Sending CMD: b0, len: 1
D (5496) ili9488: Sending CMD: b1, len: 1
D (5500) ili9488: Sending CMD: b4, len: 1
D (5504) ili9488: Sending CMD: b6, len: 3
D (5508) ili9488: Sending CMD: b7, len: 1
D (5512) ili9488: Sending CMD: f7, len: 4
I (5716) ili9488: Initialization complete
I (5716) LCD: Turn on LCD backlight
I (5716) LCD: Initialize LVGL library
[Info]  (0.000, +0)      lv_init: begin         (in lv_obj.c line #102)
[Warn]  (0.000, +0)      lv_init: Style sanity checks are enabled that uses more RAM    (in lv_obj.c line #172)
I (5732) LCD: Initialize I2C Driver
D (5737) i2c.common: new bus(0) at 0x3ffc05d8
I (5741) gpio: GPIO[21]| InputEn: 1| OutputEn: 1| OpenDrain: 1| Pullup: 1| Pulldown: 0| Intr:0 
I (5750) gpio: GPIO[22]| InputEn: 1| OutputEn: 1| OpenDrain: 1| Pullup: 1| Pulldown: 0| Intr:0 
D (5760) i2c.common: bus clock source frequency: 80000000hz
V (5765) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (5772) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0x10E
D (5780) intr_alloc: Connected src 49 to int 13 (cpu 0)
I (5785) LCD: Initialize Touch Driver
I (5790) GT911: Checking for GT911 Touch Controller
E (5795) lvgl_i2c: Invalid port or not configured for I2C Manager: 0
E (5802) GT911: Error reading from device: ERROR
I (5807) LCD: Register touch driver to LVGL
[Warn]  (0.000, +0)      lv_indev_drv_register: lv_indev_drv_register: no display registered hence can't attach the indev to a display  (in lv_hal_indev.c line #81)

assert failed: void tft_init() tft.h:176 (my_indev)


Backtrace: 0x400825ae:0x3ffbf0a0 0x40089989:0x3ffbf0c0 0x40091781:0x3ffbf0e0 0x400d4883:0x3ffbf200 0x400d4a1d:0x3ffbf330 0x40089a84:0x3ffbf360 0x4008d065:0x3ffbf390

What am I approaching wrong? Do you have any suggestions regarding a working library?

Upvotes: 0

Views: 676

Answers (0)

Related Questions