Tuesday, November 21st 2017, 3:00pm UTC+1

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.

Ant

Beginner

Date of registration: May 15th 2014

Posts: 4

1

Monday, May 25th 2015, 2:22pm

LCD Display area cut off

Hello,

Hopefully someone can provide me with some info on a problem I am having...

I am changing the display of the STM32F429 Discovery board (240x320) to a NewHaven display (480x272):

NHD‐4.3‐480272EF‐ATXL#‐T


The new display lists the driver as the Himax HX8257‐A, which is connected straight by RGB and sync signals (using internal controller of STM32F429 only). The issue I have is that the full area of the display is not used, the display works, I can run the emWin demos but they don't quite fit the screen properly. As far as I can tell the hardware is being initialised correctly, I can get a test pattern filling the whole LCD when I initialise the on board controller... the problem is when I use emWin the windows is not the size it should be.

I have attached a photo so you can see, does anyone have any ideas what this is most likely to be?

Best Regards,

Ant
Ant has attached the following image:
  • IMG_20150525_131931.jpg

Ant

Beginner

Date of registration: May 15th 2014

Posts: 4

2

Monday, May 25th 2015, 9:50pm

Also just to add some more information...

I tried the simple "Hello world!" code, the output is at the top left corner but misses off the first word, it's as though the windows is shifted left and up slightly for some reason but I can't see why it should be. Photo attached for the Hello World using emWin and the test pattern I can get when I initialise the STM32F429 controller. This is using GUIDRV_LIN_16 and GUICC_M565.

If I make calls to LCDGetXSize() & LCDGetYSize() then it does bring back the correct dimensions. The pixel clock rate is OK, as are the LCD timings, they are the same as the 480x272 LCD on the STM32429I-EVAL.

Any comments / help appreciated.

Ant
Ant has attached the following images:
  • IMG_20150525_203847.jpg
  • Test_Pattern.jpg

This post has been edited 1 times, last edit by "Ant" (May 25th 2015, 9:56pm)


SEGGER - Adrian

Super Moderator

Date of registration: May 26th 2009

Posts: 994

3

Tuesday, May 26th 2015, 10:54am

Hello Ant,

I would recommend you to check the initialization of your display. Since the GUIDRV_Lin actually just manages the frame buffer without communicating with the display controller at all, you should likely find the cause of the problem in the initialization sequence of your display controller. Otherwise please contact your display vendor.

Best regards,
Adrian

UniDev

Beginner

Date of registration: May 21st 2015

Posts: 11

4

Tuesday, May 26th 2015, 1:23pm

Hello Ant,

I recommed to you to check your LCD timming. Look at

GUIDRV_stm32f429i_discovery.c file:

C/C++ Source code

1
2
3
4
5
6
7
8
9
10
11
12
/*********************************************************************
*
*   	H/V front/backporch and synchronization width/height
*/
#define HBP  216
#define VBP  35

#define HSW  800
#define VSW  480

#define HFP  40
#define VFP  10


and stm32f429i_discovery_ldc.c
(here the values are accumulated see page 481 of RM0090 IAR)

C/C++ Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 /* Timing configuration */  
  /* Configure horizontal synchronization width */ 	
  LTDC_InitStruct.LTDC_HorizontalSync = 128;
  /* Configure vertical synchronization height */
  LTDC_InitStruct.LTDC_VerticalSync = 2;
  /* Configure accumulated horizontal back porch */
  LTDC_InitStruct.LTDC_AccumulatedHBP = 216; 
  /* Configure accumulated vertical back porch */
  LTDC_InitStruct.LTDC_AccumulatedVBP = 35;  
  /* Configure accumulated active width */  
  LTDC_InitStruct.LTDC_AccumulatedActiveW = 1016;
  /* Configure accumulated active height */
  LTDC_InitStruct.LTDC_AccumulatedActiveH = 515;
  /* Configure total width */
  LTDC_InitStruct.LTDC_TotalWidth = 1056; 
  /* Configure total height */
  LTDC_InitStruct.LTDC_TotalHeigh = 525;
  
  LTDC_Init(&LTDC_InitStruct);
  


Best regards.

This post has been edited 2 times, last edit by "UniDev" (May 26th 2015, 1:26pm)


Ant

Beginner

Date of registration: May 15th 2014

Posts: 4

5

Tuesday, May 26th 2015, 8:14pm

Hi guys,

I managed to figure it out after coming to the same conclusion, you are both correct :-) I had to adjust the HBP and VBP values in the GUIDRV file, it seems to work fine now.

Many thanks!

Ant