cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure TouchGFX with a monochrome LCD on FMC ?

Watchinofoye
Associate II

Hi,

For the purposes of a project, I have a board driven by an STM32F746ZET6, which communicates with an LCD screen (C12864WO from Newhaven Displays) driven by an ST7565P. Communication with the display is via an FMC.

I manage to display pixels on the screen directly via FMC communication. But now I'd like to use TouchGFX to ease the creation of the graphic interface with TouchGFX Designer. And that's where it gets tricky.

The screen is rather atypical for TouchGFX. It's monochrome and the resolution of the 8080 parallel interface is 8 bits. TouchGFX can handle FMC, but only for 16-bit.
What's more, the pixel arrangement is not like on other screens I've seen so far. GRAM is made up of 8 pages which divide the screen into 8 lines 128 pixels long by 8 pixels high. When I send 8 bits via FMC, instead of filling 8 bits horizontally as on other screens, the screen fills the 8 bits in the first column of the first page, before moving on to the next column.

So I'm trying to adapt the code for this rather special display. Based on the information on this page (unfortunately very 16-bit screens oriented): https://support.touchgfx.com/docs/development/touchgfx-hal-development/scenarios/scenarios-fmc
I need to be able to manipulate the framebuffer and I don't understand at all how it's arranged. I've configured STM32CubeMX for a resolution of 128x64 pixels, with a color depth of BW (so logically 1 bpp).

stm32cubeide_0WrSOOkPe2.png

But in the code, the framebuffer is managed by a uint32_t array of (((128 + 7) / 8 ) * 64 + 3) / 4 elements. And the getTFTFrameBuffer() function returns the same array cast to a 16-bit pointer (uint16_t*).

stm32cubeide_o0mKMMp38a.pngstm32cubeide_YpkiMOWcsO.png

Could you help me make sense of this?

Thanks in advance.

10 REPLIES 10

Well, I better start working on the driver then. 

I'll ping you again once I'm done with it. I will need some further tips to add the driver to the application. 

Thanks for the help. :victory_hand: