Tuesday, June 27th 2017, 2:13pm UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

dra-mi

Beginner

Date of registration: Apr 2nd 2015

Posts: 4

1

Thursday, April 2nd 2015, 12:50pm

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...

SEGGER - Adrian

Super Moderator

Date of registration: May 26th 2009

Posts: 994

2

Monday, April 13th 2015, 11:43am

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

dra-mi

Beginner

Date of registration: Apr 2nd 2015

Posts: 4

3

Tuesday, April 14th 2015, 4:29pm

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
dra-mi has attached the following image:
  • SAM_8971.JPG

dra-mi

Beginner

Date of registration: Apr 2nd 2015

Posts: 4

4

Wednesday, April 15th 2015, 6:34am

Hi,

I've checked LTDC VSYNC a HSYNC signal length, and it should be OK.

Is necessary to HW change R/L and U/D pull-up settings on LCD?

dra-mi

Beginner

Date of registration: Apr 2nd 2015

Posts: 4

5

Wednesday, April 15th 2015, 9:35am

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
dra-mi has attached the following image:
  • segger.jpg