ESP32-S3-Touch-LCD-4.3B - tearing #511
Replies: 5 comments
-
|
I need to see your initialization code and also the command you used to compile the binding. Your build command should have been as follows. also what size framebffer are you using? are you using 2 frame buffers? You should be using 2 frame buffers and those frame buffers should be sized as If memory serves you should have the display frequency set to 12.5 mHz (12500000 Hz) are you using 16 bit color or 24 bit color? |
Beta Was this translation helpful? Give feedback.
-
|
also you should not be calling lv.task_handler() at all. That is all handled internally. I really need to see the code you are using in order to help. |
Beta Was this translation helpful? Give feedback.
-
|
Kevin, I build a firmware with command python3 make.py --toml display_configs/Waveshare-ESP32-S3-Touch-LCD-4.3B.tomlFrom REPL my output display.py file in firmware from micropython import const
import lvgl as lv
_DISPLAY_BUS_DATA0 = const(14)
_DISPLAY_BUS_DATA1 = const(38)
_DISPLAY_BUS_DATA2 = const(18)
_DISPLAY_BUS_DATA3 = const(17)
_DISPLAY_BUS_DATA4 = const(10)
_DISPLAY_BUS_DATA5 = const(39)
_DISPLAY_BUS_DATA6 = const(0)
_DISPLAY_BUS_DATA7 = const(45)
_DISPLAY_BUS_DATA8 = const(48)
_DISPLAY_BUS_DATA9 = const(47)
_DISPLAY_BUS_DATA10 = const(21)
_DISPLAY_BUS_DATA11 = const(1)
_DISPLAY_BUS_DATA12 = const(2)
_DISPLAY_BUS_DATA13 = const(42)
_DISPLAY_BUS_DATA14 = const(41)
_DISPLAY_BUS_DATA15 = const(40)
_DISPLAY_BUS_HSYNC = const(46)
_DISPLAY_BUS_VSYNC = const(3)
_DISPLAY_BUS_DE = const(5)
_DISPLAY_BUS_PCLK = const(7)
_DISPLAY_BUS_FREQ = const(12000000)
_DISPLAY_BUS_HSYNC_FRONT_PORCH = const(8)
_DISPLAY_BUS_HSYNC_BACK_PORCH = const(8)
_DISPLAY_BUS_HSYNC_PULSE_WIDTH = const(4)
_DISPLAY_BUS_HSYNC_IDLE_LOW = const(True)
_DISPLAY_BUS_VSYNC_FRONT_PORCH = const(8)
_DISPLAY_BUS_VSYNC_BACK_PORCH = const(8)
_DISPLAY_BUS_VSYNC_PULSE_WIDTH = const(4)
_DISPLAY_BUS_VSYNC_IDLE_LOW = const(False)
_DISPLAY_BUS_DE_IDLE_HIGH = const(False)
_DISPLAY_BUS_PCLK_IDLE_HIGH = const(True)
_DISPLAY_BUS_PCLK_ACTIVE_LOW = const(True)
_I2C_BUS_HOST = const(0)
_I2C_BUS_SCL = const(9)
_I2C_BUS_SDA = const(8)
_I2C_BUS_FREQ = const(400000)
_DISPLAY_WIDTH = const(800)
_DISPLAY_HEIGHT = const(480)
import lcd_bus
display_bus = lcd_bus.RGBBus(
data0=_DISPLAY_BUS_DATA0,
data1=_DISPLAY_BUS_DATA1,
data2=_DISPLAY_BUS_DATA2,
data3=_DISPLAY_BUS_DATA3,
data4=_DISPLAY_BUS_DATA4,
data5=_DISPLAY_BUS_DATA5,
data6=_DISPLAY_BUS_DATA6,
data7=_DISPLAY_BUS_DATA7,
data8=_DISPLAY_BUS_DATA8,
data9=_DISPLAY_BUS_DATA9,
data10=_DISPLAY_BUS_DATA10,
data11=_DISPLAY_BUS_DATA11,
data12=_DISPLAY_BUS_DATA12,
data13=_DISPLAY_BUS_DATA13,
data14=_DISPLAY_BUS_DATA14,
data15=_DISPLAY_BUS_DATA15,
hsync=_DISPLAY_BUS_HSYNC,
vsync=_DISPLAY_BUS_VSYNC,
de=_DISPLAY_BUS_DE,
pclk=_DISPLAY_BUS_PCLK,
freq=_DISPLAY_BUS_FREQ,
hsync_front_porch=_DISPLAY_BUS_HSYNC_FRONT_PORCH,
hsync_back_porch=_DISPLAY_BUS_HSYNC_BACK_PORCH,
hsync_pulse_width=_DISPLAY_BUS_HSYNC_PULSE_WIDTH,
hsync_idle_low=_DISPLAY_BUS_HSYNC_IDLE_LOW,
vsync_front_porch=_DISPLAY_BUS_VSYNC_FRONT_PORCH,
vsync_back_porch=_DISPLAY_BUS_VSYNC_BACK_PORCH,
vsync_pulse_width=_DISPLAY_BUS_VSYNC_PULSE_WIDTH,
vsync_idle_low=_DISPLAY_BUS_VSYNC_IDLE_LOW,
de_idle_high=_DISPLAY_BUS_DE_IDLE_HIGH,
pclk_idle_high=_DISPLAY_BUS_PCLK_IDLE_HIGH,
pclk_active_low=_DISPLAY_BUS_PCLK_ACTIVE_LOW
)
import i2c
i2c_bus = i2c.I2C.Bus(
host=_I2C_BUS_HOST,
scl=_I2C_BUS_SCL,
sda=_I2C_BUS_SDA,
freq=_I2C_BUS_FREQ
)
import gt911
indev_device = i2c.I2C.Device(
bus=i2c_bus,
dev_id=gt911.I2C_ADDR,
reg_bits=gt911.BITS
)
import rgb_display
display = rgb_display.RGBDisplay(
data_bus=display_bus,
display_width=_DISPLAY_WIDTH,
display_height=_DISPLAY_HEIGHT,
color_space=lv.COLOR_FORMAT.RGB565
)
display.set_power(True)
display.init()
display.set_backlight(100)
import gt911
indev = gt911.GT911(device=indev_device)
import task_handler
task_handler.TaskHandler()i can confirm i do not call lv.task_handler() what i did is to modify display.py with :
_DISPLAY_BUS_FREQ = const(10000000)
_BUFFER = const(38400) #1/10
_BUF1 = rgb_bus.allocate_framebuffer(_BUFFER, lcd_bus.MEMORY_SPIRAM)
_BUF2 = rgb_bus.allocate_framebuffer(_BUFFER, lcd_bus.MEMORY_SPIRAM)
display = rgb_display.RGBDisplay(
data_bus=display_bus,
display_width=_DISPLAY_WIDTH,
display_height=_DISPLAY_HEIGHT,
frame_buffer1=_BUF1,
frame_buffer2=_BUF2,
color_space=lv.COLOR_FORMAT.RGB565
)
_BUFFER = const(38400) #1/10
_BUF1 = rgb_bus.allocate_framebuffer(_BUFFER, lcd_bus.MEMORY_SPIRAM)
display = rgb_display.RGBDisplay(
data_bus=display_bus,
display_width=_DISPLAY_WIDTH,
display_height=_DISPLAY_HEIGHT,
frame_buffer1=_BUF1,
color_space=lv.COLOR_FORMAT.RGB565
)Regards, |
Beta Was this translation helpful? Give feedback.
-
|
OK edit the toml file and under the line use the generated display file how it is. to not modify anything. It handles setting the frame buffers how they need to be set... RGB displays are not the best kind of display to run on the ESP32. especially ones that are 800 x 480 resolution. It requires a lot of work to update a display of that size. If you still have issues then modify the generated display file and add in allocation the frame buffers yourself. You are going to more than likely want to increase the size of them. |
Beta Was this translation helpful? Give feedback.
-
|
Kevin, i did some tests with no luck
_DISPLAY_BUS_FREQ = const(12500000)
import rgb_display
# Partial buffer size (~1/10 of display)
# _BUFFER_SIZE = _DISPLAY_WIDTH * _DISPLAY_HEIGHT * 2bytes / 10
_BUFFER_SIZE = const(153600)
# Allocate partial buffers for double-buffering
fb1 = display_bus.allocate_framebuffer(_BUFFER_SIZE, lcd_bus.MEMORY_SPIRAM)
fb2 = display_bus.allocate_framebuffer(_BUFFER_SIZE, lcd_bus.MEMORY_SPIRAM)
display = rgb_display.RGBDisplay(
data_bus=display_bus,
display_width=_DISPLAY_WIDTH,
display_height=_DISPLAY_HEIGHT,
frame_buffer1=fb1,
frame_buffer2=fb2,
color_space=lv.COLOR_FORMAT.RGB565
)p.s. did you consider upgrading toml_reader.py to enable extender from toml file. Now it's not added to display.py. [CH422G.io_expander]
device = "io_expander_device"
[I2C.Device.io_expander_device]
bus = "i2c_bus"
dev_id = "ch422g.I2C_ADDR"
reg_bits = "ch422g.BITS"Regards, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
i've build a firmware from toml file for Waveshare ESP32-S3-Touch-LCD-4.3B, but i see some tearing - single lines when scrolling lists, grids or clicking dropdown menu.
Anyone had similiar issue and solved it ?
I already tried :
Any help appreciated.
Regards
Michal
Beta Was this translation helpful? Give feedback.
All reactions