cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4R9I-DISCO with new ST7796H2 display driver

Du1
Senior

Working on getting a new TFT DSI LCD display to work on the STM32L4R9I-DISCOVERY kit. It uses the ST7796H2 display driver. emWin shows they have added support for this in their 5.36 version in the GUIDRV_FlexColor files, but STemWin is only reved to 5.32.

TouchGFX doesn't use the GUIDRV_FlexColor, where are the hardware specific files for editing to add support for this new LCD? I've read: (https://touchgfx.zendesk.com/hc/en-us/articles/204993942-Changing-to-a-different-display) but it doesn't mention specific file and I've browsed through various files without noticing the right one to work with. (GuiConfig.h, gui_main.h/cpp, stm32l4xx_hal_lcd.h, ...)

Thanks for your guidance and support.

17 REPLIES 17

Review the DSI document from Qualcomm that is attached. Specifically table 3-1 and see if it helps. Keeping in mind that DSI registers are supposed to be common across any vendor of the display, review the horizontal values to see if they impact your display. This is exciting as it appears that you are getting closer!

Thanks a lot Mon! I'll make sure to review that doc and link you shared.

Du1
Senior

Success!!! Turns out there was a old value being programmed from the old 390x390 display.

Du1
Senior

This is the source code for the ST7796H2 lcd driver if anyone needs it. This runs on the STM32L4R9I-DISCOVERY kit.

Du1
Senior

This is the LUT for 320x320 generated from the CubeMX. Didn't have time to optimize for a round LCD, so it's just a square 320x320 LUT, not the most memory efficient, but it works....

Good job @Du​ !! Thank you for posting. We are planning to use a 800x480 IPS with CTP and DSI interface in the near future. Will be performing a similar exercise as the controllers are changing with the wind direction. Details to follow after that review. Hope to review some displays at the upcoming fairs in HK (April).

Thanks @Mon2​ ! Good luck with your project! Looking forward to hearing about it.