Orientation problem on STM324x9I board

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

  • Orientation problem on STM324x9I board

    Hi,

    I've got STM324x9I Eval board. I've compiled example of emWin library - all is OK. Now I need rotate display to 90 degress.

    I've change the definition in LCDConf file:
    #define DISPLAY_DRIVER_0 GUIDRV_LIN_32

    to

    #define DISPLAY_DRIVER_0 GUIDRV_LIN_OSY_32

    and it doesn't work.

    I've tried to use GUI_SetOrientation too. But it return 0x01. Memory size is:

    #define GUI_NUMBYTES 163840

    Where could be a problem?

    Thank you for your answers...
  • Hello,

    Please note that the memory which is assigned to emWin does not include the frame buffer. Still the function GUI_SetOrientation() would use this memory for rotating the output. In order to set the orientation at runtime I would recommend upsizing the emWin memory pool.

    Nevertheless using GUIDRV_LIN_OSY_32 should work. Could you please tell me what exactly goes wrong? Have you already tried to contact your emWin supplier?

    Best regards,
    Adrian
  • When I change GUIDRV_LIN_32 to GUIDRV_LIN_OSY_32, LTDC get wrong params and the displaying is broken. I've replaced XSIZE_PHYS and YSIZE_PHYS, and LTDC is fixed.

    #define XSIZE_PHYS 272
    #define YSIZE_PHYS 480

    #define LCD_SWAP_XY 1
    #define LCD_MIRROR_Y 1

    #define DISPLAY_DRIVER_0 GUIDRV_LIN_OSY_32

    Code:

    LCD_SetSizeEx(0, XSIZE_PHYS, YSIZE_PHYS);

    GUI_SetColor(GUI_GREEN);
    GUI_FillRect(0,0,XSIZE_PHYS,YSIZE_PHYS);
    GUI_SetColor(GUI_WHITE);
    GUI_FillRect(5,5,XSIZE_PHYS-5,YSIZE_PHYS-5);

    The result is in the attachment...

    I will try to check LTDC signals, but I think problem is in the setting of library...

    Thank you
    Images
    • SAM_8971.JPG

      606.9 kB, 3,648×2,736, viewed 643 times
  • I've watched the SDRAM memory, solution for that problem has been to add calling LCD_SetVSizeEx(0, 272, 480);

    But I think, the settings aren't completed. See the photo

    Code:

    LCD_SetVSizeEx(0, 272, 480);

    TEXT_CreateEx(0, 0, 240, 30, WM_HBKWIN, WM_CF_SHOW, GUI_TA_HCENTER | GUI_TA_VCENTER, 0, text);
    TEXT_CreateEx(120, 100, 240, 30, WM_HBKWIN, WM_CF_SHOW, GUI_TA_HCENTER | GUI_TA_VCENTER, 1, text);
    TEXT_CreateEx(0, 200, 240, 30, WM_HBKWIN, WM_CF_SHOW, GUI_TA_HCENTER | GUI_TA_VCENTER, 2, text);
    TEXT_CreateEx(120, 300, 240, 30, WM_HBKWIN, WM_CF_SHOW, GUI_TA_HCENTER | GUI_TA_VCENTER, 3, text);

    bh_start = BUTTON_CreateEx(50, 400, 65, 45, WM_HBKWIN, WM_CF_SHOW, 0, 4);
    BUTTON_SetText(bh_start, text);
    BUTTON_SetFont(bh_start, GUI_FONT_13B_ASCII);

    WM_SetCallback(WM_HBKWIN, &cb_background);

    while(1)
    GUI_Exec();

    Can you tell me, where's problem?

    Thank you very much
    Images
    • segger.jpg

      791.98 kB, 2,400×3,200, viewed 808 times