Skip to main content
GMeur
Associate III
Aug 1, 2019 6:12 AM UTC
Question

Using LCD screen vertically

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

Aug 2, 2019 7:45 AM UTC

Did you try to use

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

and change

screen_orientation := -rotate90

in TouchGFX\config\app.mk

GMeur
GMeurAuthor
Associate III
Aug 2, 2019 10:26 AM UTC

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
Aug 7, 2019 1:18 PM UTC

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
Aug 26, 2019 10:45 AM UTC

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!