Today I received my WT32-SC01 esp32 based board and I had some problems configuring the TFT driver ( ST7796S ).
Initially I compiled LVGL with LV_COLOR_DEPTH=16 and then I added LV_COLOR_16_SWAP=1, but nothing changes.
When I write directly to the LCD (no LVGL involved), I still see different colors than I spected.
I already tried to change the RBG/BGR color format on the MADCTL register, the inversion, the SPI endian… but I never got the correct colors.
The RGB565 colors I think LVGL needs are these, at least this is what I see on internet:
RED = 0xF800
GREEN = 0x07E0
BLUE = 0x001F
But with my LCD configuration I got:
Black and white are ok, so there is no LCD inversion needed, RED is ok, but GREEN and BLUE are swapped…and I dont know why…
Here is the code Im using
test_st7796s.py.txt (3.8 KB)
The driver datasheed: