Unable to get touch working on ESP32 ILI9488

@amirgon First of all thanks for your help and all the work you have put into this project!

I decided to first check to see if the display was even refreshing. My Python knowledge is pretty basic and I’m new at micropython so my code might not work in the first place.

Below is the code I used to check screen refresh:

import sys
sys.path.append('')

import espidf as esp 
import lvgl as lv
import time
lv.init()

from ili9XXX import ili9488
disp = ili9488(miso=19, mosi=23, clk=18, cs=4, dc=15, rst=2, spihost=esp.VSPI_HOST, mhz=20,power=-1,backlight=-1, factor=16, hybrid=True, width=320, height=480, invert=False, double_buffer=True, half_duplex=False)


from xpt2046 import xpt2046
touch = xpt2046(cs=21, spihost=esp.VSPI_HOST, transpose=True)

scr = lv.obj()
btn = lv.btn(scr)
btn.align_to(lv.scr_act(), lv.ALIGN.CENTER, 0, 0)
label = lv.label(btn)
while True:
	label.set_text("Hello World!")
	lv.scr_load(scr)
	time.sleep(1)
	label.set_text("TEST")
	lv.scr_load(scr)

With this code, it gets stuck on Hello World! and never changes to TEST. Again it could be a problem with my code. I tried removing the xpt2046 import and initialization line, but still no luck. I also tried your suggestions in the code of lowering the mhz and changing half-duplex to false (I assume that makes it run in full-duplex).

GOOD NEWS! The touch screen does seam to be working, I tested get_cords using code below and I get an x and y output when I touch the screen:

import sys
sys.path.append('')

import espidf as esp 
import lvgl as lv
import time
lv.init()

from ili9XXX import ili9488
disp = ili9488(miso=19, mosi=23, clk=18, cs=4, dc=15, rst=2, spihost=esp.VSPI_HOST, mhz=20,power=-1,backlight=-1, factor=16, hybrid=True, width=320, height=480, invert=False, double_buffer=True, half_duplex=False)


from xpt2046 import xpt2046
touch = xpt2046(cs=21, spihost=esp.VSPI_HOST, transpose=True)

scr = lv.obj()
btn = lv.btn(scr)
btn.align_to(lv.scr_act(), lv.ALIGN.CENTER, 0, 0)
label = lv.label(btn)
while True:
	print(touch.get_coords())

Are the only pins that need to be connected to specific pins are miso (technically not connected in my case), mosi and clk (SPI pins of esp32)? The other pins can be connected to any gpio, right?

I also ordered a ILI9341 which through the magic of amazon should arrive tomorrow, and i can do some testing with it.