Skip to main content
David George
Associate III
April 11, 2024
Solved

TouchGFX Display Orientation Setting - 0/90/180/270 degrees?

  • April 11, 2024
  • 3 replies
  • 5630 views

Hello all

I know there have been plenty of posts about TouchGFX not providing the full set of display rotation options usually found in other GUI systems such as emWin (0, 90, 180, 270 degrees). But I wanted to ask ST / TouchGFX if there any plans to add this functionality in the future?

As an embedded engineer we often have to provide solutions for problems, and being presented with a display that had to be mounted upside down or rotated 90 degrees is not un common, usually enclosure or PCB connector constraints demand the display is orientated so the FPC connector tail is in a pre-set position. In the real world we are not creating firmware for DISCO or NUCLEO development boards. 

As a long time user of emWin, being able to rotate the display image was assumed. Its an essential feature, just like displaying a text string.

I know there is a ugly 'solution' offered that involves swapping all the pixels in the frame buffer, but as suggested this is 'expensive' in terms of bandwidth and power, and far from ideal.

I really hope TouchGFX have this feature the on their development roadmap for the near futrure.

 

 

This topic has been closed for replies.
Best answer by Osman SOYKURT

Hello @christian_se ,

This has been discussed with the team, and it's not a feature we are focusing on right now. However, it's among the thing that we could do in future since it would help on TouchGFX applications development of many users. I can't promise on a release date. Hope that answers your question.

3 replies

Osman SOYKURT
Technical Moderator
April 11, 2024

Hello @David George ,

Thank you very much for your feedback! I'll elevate that internally to our team We appreciate suggestions like yours as they help us to understand the needs of our customers and on what we can focus on to enhance the TouchGFX experience. I can't promise anything but I will let you know as soon as I have more on this subject.
Best regards,

Osman SOYKURTST Software Developer | TouchGFX
David George
Associate III
April 11, 2024

I appreciate that Osman.

TouchGFX is a great package, from the few projects we have done I can say it's a big improvement over emWin. Just be nice to have our lovely screen designs the right way up!

MM..1
Chief III
April 11, 2024

Hi David, i understand your idea, when i start with TGFX i have project on DSI display , that require 180 swap and i create all gui upside down. Hard to see harder todo. But i mean this isnt part of TGFX job. Orientation on 90% displays is hw issue and registers or hw setup control this over driver. And drivers isnt part of TGFX.

 

David George
Associate III
April 11, 2024

The registers you are talking about (Row, Column address increment control) are only used when transferring display data from the internal display RAM in the display controller. The display data in this internal RAM is usually sent using a slower I2C, SPI or a 8/16/18 bit MCU interface.

But when using a RGB video VSync, HSync, DotClk interface the display data bypasses the internal RAM and goes straight to the pixels at the frame rate its clocked in at.

So changing the Row, Column address increment registers will have no effect on the displayed image.

Why do we choose a RGB interface? Because its fast and allows 60Hz frame rates, and this is also the interface required by the LTDC in the STM32.

Sure not all displays are the same, but I bet in RGB video mode they all operate the same way.

 

MM..1
Chief III
April 11, 2024

Show your display info and dont waste time with this theory. RGB dont define, that display skips internal memory, and some displays dont have internal memory and accept setups for rotation...

One example ST7262 800x480

MM1_0-1712929449219.png

 

David George
Associate III
April 18, 2024

The display controller I'm currently using (ST7789V) does not have a HDIR or VDIR hardware pin.

But you got me thinking, I noticed the ST7789V does have a "RGB to RAM" mode (instead of sending the RGB data directly to the display shift register as I was), so I enabled this to hopefully send the data to the internal memory in the controller.

  • (B1h) RGBCTRL.WO = 1 (Direct RGB Mode to Memory)

Then I changed the Memory Data Access Control settings that control the RAM to Display addressing.

So to mirror the image I selected to X Swap, Y Swap.

  • (36h) MADCTRL.MX = 1  (Right to Left)
  • (36h) MADCTRL.MY = 1  (Bottom to Top)

Now my RGB image has been flipped 180 degrees just as I needed. Perfect, I learnt something today.

 

So thank you MM..1 for making me take a second look to solve this. 

Osman SOYKURT
Osman SOYKURTBest answer
Technical Moderator
September 17, 2024

Hello @christian_se ,

This has been discussed with the team, and it's not a feature we are focusing on right now. However, it's among the thing that we could do in future since it would help on TouchGFX applications development of many users. I can't promise on a release date. Hope that answers your question.

Osman SOYKURTST Software Developer | TouchGFX