Skip to main content
moredatalesscenter
Associate III
July 3, 2020
Question

TouchGFX screen rotation 180 degrees?

  • July 3, 2020
  • 4 replies
  • 3207 views

How to rotate the entire screen by 180 degrees landscape orientation?

This topic has been closed for replies.

4 replies

Romain DIELEMAN
ST Employee
July 7, 2020

Hi,

Short answer, the 180° rotation is not supported by TouchGFX.

But what is your setup? A lot of displays allow this rotation at a driver level. Another option is to rotate the framebuffer but this is at the expense of a lot of performance loss. You can find how Martin implemented it here in an other post.

/Romain

Tuoman
Senior II
July 8, 2020

Parallel interface (8080, 6800) displays can do this by setting MADCTL registers, but is driver level flipping possible in RGB interface displays?

Or maybe one can populate framebuffer back-to-front, I don't know...

moredatalesscenter
Associate III
July 7, 2020

Hi Romain, thanks for the link. I hadn't seen it before.

I managed to implement it at driver level, by reversing every row, byte and bit in the 1bpp framebuffer. I was really hoping for a more efficient solution and one that would also work for the simulator too, given that 90 degree rotation is supported.

Thanks

Simon

moredatalesscenter
Associate III
July 10, 2020

Another question is relating to my 1bpp black/white screen. In the framebuffer, 0xFF is all white and 0x00 is black/other colour/not set. This causes 2 problems:

  1. If I don't have a white box set as background on every screen, then the whole screen appears black. It defaults all pixels not set to white as black - this includes the checkerboard background in new screens. Is there a way to default all pixels that haven't explicitly been set to black as white?
  2. All images have to be saved as black white e.g in Paint. If I don't then imageconverter converts every pixel to 0x00 black. Is there a way to control imageconverter with a 50% threshold to decide white or black?
moredatalesscenter
Associate III
July 15, 2020

Hello, any idea about the 1bpp screen? I've had to add a white box on every screen and save all PNG files as 1bpp. I would have expected that the framebuffer is black only when any pixel is explicitly black.