cancel
Showing results for 
Search instead for 
Did you mean: 

Using LCD screen vertically

GMeur
Senior

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.

5 REPLIES 5
qqAnton
Senior

Did you try to use

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

and change

screen_orientation := -rotate90

in TouchGFX\config\app.mk

GMeur
Senior

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
Chief III

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

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!

Hi,

I'm confused. You said you want to display a landscape application. This is default. And now you've changed your canvas to be portrait (480x800).To me, the application looks as it should in landscape, but i'm pretty sure this is not what you want.

You want

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