Skip to main content
STang.1
Associate II
March 31, 2020
Question

Set DisplayRotation to 270

  • March 31, 2020
  • 2 replies
  • 1355 views

Hi,

We have this odd requirement due to LCD mounting limitations on our product. I can run touchgfx UI application with DisplayOrientation set to rotate90. But we want it to be rotate270 to match the lcd mounted on the product. Based on my understanding this should not be an issue for graphics engine. I mean rotating 90 or 270 (-90) should not be any issue in terms of performance. STemWin supports this feature.

Can you please suggest if there is a way to achieve 270 (-90) rotation in touchgfx?

This topic has been closed for replies.

2 replies

Martin KJELDSEN
Principal III
April 1, 2020

We only support 90 degrees, for now. I've posted a Widget that will, VERY INEFFECIENTLY, swap pixels to achieve 180 degrees, and someone in the same thread modified it to do 270 degrees. Can you have a look for it?

So to summarize, we do not support 270 natively. There's a very ineffecient widget that can swap pixels, but it does not perform well naturally.

/Martin

MYUAN.1
ST Employee
February 9, 2021

Hi Martin, can you share the widget that can swap pixels 180 degrees to me. I want to have a look, one customer also met this issue. My email is mike.yuan@st.com.

Thanks.

Mike

AVI-crak
Senior
April 1, 2020

Displays with MCU 8/16, and SPI - can rotate the image in any direction.

STang.1
STang.1Author
Associate II
April 5, 2020

Thanks for the input. LCD is connected to STM32 through LTDC interface. Although I can its I2C interface to configure its rotation, it does not work well with dynamic applications. The reason for this, if framebuffer and display RAM are not matched in orientation, then control signals HSync and VSync have no meaning. Display will show a static screen without any issues, but dynamic screens with changing data will show tearing effects as display RAM is being updated in accordance with timings configured in LTDC, but display itself is updated as per the rotated configuration.

scottSD
Senior III
April 6, 2020

you might have to change your design so that everything (all images, etc) are rotated 270.....