rzeldent / esp32-smartdisplay

PlatformIO library LVGL Drivers for Sunton Smart display boards (CYD Cheap Yellow Display). This library supports these boards without any effort. ESP32-2432S024N/R/C, ESP32-2432S028R/C, ESP32-3248S035R/C, ESP32_8048S070N/C
https://github.com/rzeldent/platformio-espressif32-sunton
GNU General Public License v3.0
399 stars 70 forks source link

No display on ESP32-2432S032 #111

Closed sonictruth closed 5 months ago

sonictruth commented 8 months ago

Hi, I'm getting this errors and also the screen is not updating.

E (166) spi_master: check_trans_valid(689): txdata transfer > host maximum
E (166) lcd_panel.io.spi: panel_io_spi_tx_color(380): spi transmit (queue) color failed

What could be the issue ? Thanks!

sonictruth commented 8 months ago

The fix was to set max_transfer_sz:

    const spi_bus_config_t spi_bus_config = {
        .max_transfer_sz = LCD_WIDTH * LCD_HEIGHT,

in .pio/libdeps/esp32-2432S032C/esp32_smartdisplay/src/lvgl_st7789.c ( https://github.com/rzeldent/esp32-smartdisplay/blob/release/2.0.3/src/lvgl_st7789.c#L36 )

rzeldent commented 8 months ago

Retested (without adding a max_transfer_sz) and works. Strange, the max_transfer_sz is never defined in SPI. Are using a large pixel buffer?

rzeldent commented 8 months ago

Anyone else with similar problems?

balintbuchert commented 8 months ago

Anyone else with similar problems?

Yes ,I run in to the same issue with a esp32-3248S035C board.

Following @sonictruth comment I did the same modification in: .pio/libdeps/esp32-3248S035C/esp32_smartdisplay/src/lvgl_st7796.c

ab-413 commented 7 months ago

Anyone else with similar problems?

Yes , same issue with a esp32-2432S028R board.

Following @sonictruth comment I did the same modification in: .pio\libdeps\esp32-2432S028R\esp32_smartdisplay\src\lvgl_ili9341_spi.c

rzeldent commented 7 months ago

So, setting the .max_transfer_sz helped?

ab-413 commented 7 months ago

So, setting the .max_transfer_sz helped?

Yes, display works fine

rzeldent commented 7 months ago

Hi,

I tested a bit with the MAX_TRANSFER_SZ. When not specified (like how it was) it accepts 4k data. This is due to DMA constraints. So, I decided to make it equal to the maximum amount of bytes that can be transferred. So TRANSFER_SZ is set to VGL_BUFFER_PIXELS*sizeof(lv_color16_t). I tested with a few boards and worked.

This is for now only in the develop branch https://github.com/rzeldent/esp32-smartdisplay-demo/tree/develop. Could you try if this works for you?