STM32 F7 - Discovery rotate screen

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • STM32 F7 - Discovery rotate screen

    Hi

    Do anybody know how to rotate the screen when using stemwin ...
    Did try with

    GUI_Init();
    GUI_SetOrientation(GUI_MIRROR_X |GUI_MIRROR_Y);
    GUI_Exec();

    but it did not work ...
    i tryed to look in lcd_conf but could not get that to work either ....

    I can do "everything" on the screen so everything is working VERY fine but i just need this little 180 turning the screen...

    Who have the golden words ?

    Hjalmar
  • Hi,

    May that thread helps: STemWin stm32F429 Disco Lcd rotation of 90 degrees

    Regards, Jörg
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • YES ...thanks

    in lcdconf.c just changed


    //#define DISPLAY_DRIVER_0 GUIDRV_LIN_32
    #define DISPLAY_DRIVER_0 GUIDRV_LIN_OXY_32

    then i got 180 around ...now just to do the same with the touch ...

    I did also fix the touch using the BS_touch.
    But something very strange happend
    My touch work well on all widgets but not on the MULTI_EDIT ..the cursor has the "old" orientation !!!
    I do not need the cursor but there have to be a bug in the library some where..

    THANKS ;o)

    Hjalmar

    The post was edited 1 time, last by skovholm ().

  • Hello Hjalmar,

    Could you please explain in details (may with screenshots) what do you mean with:
    the cursor has the "old" orientation !!!
    The rotation will be realised by the display driver. The application does not know the orientation of the screen.

    Best regards,
    Thorsten
  • I'm in the process of evaluating a STM32F746G-DISCO board using the STemWin graphics package for a new product development and I have a similar question on rotation of the display for a portrait orientation.

    I've looked at the linked 'STemWin stm32F429 Disco Lcd rotation of 90 degrees' thread and post 18 from ierturk shows what I'm trying to accomplish. By changing the linked driver from GUIDRV_LIN_32 to GUIDRV_LIN_OSY_32 the image was rotated 90 degrees on the screen of the STM32F429 Discovery board.

    When I try the same approach to rotating the image for the STM32F746G-DISCO board I get different results. When I change the linked driver to GUIDRV_LIN_OSY_32, instead of rotating the image by 90 degrees, as on the STM32F429 Discovery board, it appears to be 'flipping' the image vertically. I'm using a modified version of the 'STemWin_Hello_World' application from the STM32cubef7_FW_F7_V1.30 distribution that's been modified to run the DIALOG_Radio.c example.

    I've attached photos that show the results of changing the linked diver and all photos are shot with the same physical orientation of the STM32F746G-DISCO board.

    How can I rotate the image on the display screen so that the display can physically be used in a portrait orientation?

    Thanks,
    Steve
    Images
    • GUIDRV_LIN_32.JPG

      204.62 kB, 750×500, viewed 1,178 times
    • GUIDRV_LIN_OX_32.JPG

      206.46 kB, 750×500, viewed 1,047 times
    • GUIDRV_LIN_OY_32.JPG

      200.39 kB, 750×500, viewed 1,185 times
  • In talking with a coworker, I realized that I'd used GUIDRV_LIN_OY_32 instead of GUIDRV_LIN_OSY_32 so fixing that rotated the image but it contained some garbage (photo - GUIDRV_LIN_OSY_32 with GUI_Init in ST startup code and DIALOG_Radio code).

    Looking through the startup section of the ST code I noticed that they did a GUI_Init so that they could put a startup message on the screen. Getting rid of the ST startup message results in the desired operation (photo - GUIDRV_LIN_OSY_32 with DIALOG_Radio GUI_Init only).

    Steve
    Images
    • GUIDRV_LIN_OSY_32 with GUI_Init in ST startup code and DIALOG_Radio code.JPG

      238.94 kB, 750×500, viewed 1,446 times
    • GUIDRV_LIN_OSY_32 with DIALOG_Radio GUI_Init only.JPG

      208.26 kB, 750×500, viewed 1,125 times
  • Work in vertical (portrait) format

    Hi to all.
    I'm trying to work with a TFT 5 " in vertical format (portrait). The controller that I use with the TFT is a SSD1963. I'm using the emWin of Segger, CompactColor_16 driver and LCD Controller 66709.
    I tried to change the initialization driver of the SSD1963 in various ways, changing the data send to the 0x36 command, but it doesn´t make nothing..
    I have also tried to modify the LCD orientation settings:
    #define LCD_SWAP_XY 1
    #define LCD_MIRROR_Y 1
    #define LCD_MIRROR_X 0
    But the text written to the TFT doesn´t rotate. It appears in the way the attached picture shows.
    Thanks
    Amaia
    Images
    • img_kk.jpg

      170.24 kB, 576×1,024, viewed 1,518 times