I’ve got a project coming up that needs a graphic LCD so I reviewed the steps required to get an LCD framebuffer working over at this thread:
There are some minor incompatibilities between the suggested changes from that thread and the changes in SDK V2 so some minor tweaks were required but I’ve gotten it running on my bench. You can see the changes with respect to SDK V2 in my fork under the branch “spi_lcd” here:
The main problems I ran into getting it going were:
- Many of the changes to cvitek_board_init.c were not needed as they were already set up as the pinmux defaults.
- I couldn’t get my ST7735 LCD running at the full 48MHz clock rate and had to back it off to 40MHz. This is still well beyond the manufacturer’s specification of 15MHz max.
- I moved the DC, RST and BL GPIOs to different pins for my own application. I did see there appeared to be some interfering driver that was altering the state of the original GPIO15 of the RST pin which prevented my LCD from initializing properly so moving that pin appears to have fixed that problem.
It’s basically working now, but there do seem to be some weird things going on with the gamma curves that are given in the original thread - I’m getting some odd color inversions on some images. Simple bright colors used in GUI elements seem to be OK though, so I’m not in a big rush to debug that.
I may end up moving to an ST7789 or IL9341 display at some point since more pixels may be required for my project. I’ll keep updating here as that changes.