Skip to main content
GMeur
Associate III
August 1, 2019
Question

Using LCD screen vertically

  • August 1, 2019
  • 5 replies
  • 1016 views

Hello,

I've been messing around with the STM32F769 evaluation board trying to configure the init files to use the screen vertically instead of horizontally but I haven't figured out how to do it yet.

Any guidance is more than welcome here.

What's confusing to me is that the physical connection of the screen is kept unchanged and I intuition therefore that the LTDC controler must remain unaltered.

Thanks.

This topic has been closed for replies.

5 replies

August 2, 2019

Did you try to use

HAL::getInstance()->setDisplayOrientation(ORIENTATION_LANDSCAPE);

and change

screen_orientation := -rotate90

in TouchGFX\config\app.mk

GMeur
GMeurAuthor
Associate III
August 2, 2019

Hi,

I tried but it was of no avail. I also modified the screen dimensions in the touchgfx file and in BoardConfiguration.cpp (dispWidth and dispHeight) without success.

Martin KJELDSEN
Principal III
August 7, 2019

Hi, displayOrientation in TouchGFX is a software solution. Don't change your dispWidth/Height unless this is also your native display configuration.

What @qqAnton​ wrote should be enough. Can you show us some screenshots?

/Martin

GMeur
GMeurAuthor
Associate III
August 26, 2019

Sorry for the late reply, I was out of office.

I'm gonna explain everything a bit better. So, what I want to do is to use the screen of the STM32F769I board in landscape mode. I created a default project with the template of that board in TouchGFX studio and then, I changed the dimensions of the screen so that it's now 480*800 and I dragged and dropped some widgets inside. It now looks as such:

0690X00000AAGLbQAP.png

Now, I want to draw this exact screen on the 'real screen' but I'm unable to do so. I did what @qqAnton​ suggested (that is, add HAL::getInstance()->setDisplayOrientation(ORIENTATION_LANDSCAPE) in the function void GRAPHICS_MainTask(void) of the file BoardConfiguration.cpp and to change screen_orientation := -rotate90) and here's what I'm getting:

0690X00000AAGNcQAP.jpg

(The blue strip is from a previous screen). So it's clear that I'm not doing something right.

Thanks in advance for your help!