cancel
Showing results for 
Search instead for 
Did you mean: 

emWin: Problem with STM32F746 Disco board

mfrank9
Associate III
Posted on August 20, 2016 at 17:48

Hello

I have a STM32F429I-Eval board

and a STM32F746 Disco board.

I want to use StemWin with the GuiBuilder.

On both Boards I use the ''Hello World'' Examples as templates.

On the STM32F429I-Eval the Dialog are shown correctly.

But when I want to show a dialog on the STM32F746 Disco,

the content of the dialog are not shown correctly (see the first Picture below).

But the Widgets outside the dialog are shown correctly.

Another thing which don�t work on the STM32F746 Disco board 

but works on the STM32F429I-Eval board

is the ''alpa blending'' example from the emWin Manuel (Picture 2 and 3).

Maybe someone can help me.

Picture 1

0690X00000603BVQAY.jpg

Picture 2

0690X00000605OTQAY.png

Picture 3

0690X00000603CYQAY.jpg

#stemwin #stm32f746-disco
3 REPLIES 3
slimen
Senior
Posted on August 22, 2016 at 16:10

Hello frank.matthias,

In the main, the display issue may be caused by one of the following:

 - Stack size is too low.

 - Wrong initialization of the display controller.

 - Wrong configuration of the display interface. 

Regards

ForumSTM32

mfrank9
Associate III
Posted on August 25, 2016 at 22:09

Hi

-I have increased the steak size to 0x1000 but with the same result.

-I think that the lcd timings are correctly.

I have tested the lcd with the timings from the example and the timings from this link:

http://microelk.azurewebsites.net/STM32_STEmWin/STM32_STEmWin 

Both are working. But dialogs and alpha don?t work.

-The display interface in the example are

#define COLOR_CONVERSION_0 GUICC_M8888I

#define DISPLAY_DRIVER_0   GUIDRV_LIN_32

I am not sure if that ist correctly. 

The Display have 8bit for each of the 3 colors.

Should it be GUIDRV_LIN_24?

But when i change them the display dont?t work.

Another example:

Picture 1 shows how it should be.

Picture 2 shows how it is.

You can see that the ''GUI_TM_XOR'' are not shown correctly

but the other things works

Perhaps is the problem the same as in the display of dialoges.

Picture 1:

0690X00000605GTQAY.png

Picture 2:

0690X00000603BuQAI.jpg

mfrank9
Associate III
Posted on August 25, 2016 at 23:07

I have found the problem!!

The right driver is

#define COLOR_CONVERSION_0 GUICC_M888

#define DISPLAY_DRIVER_0   GUIDRV_LIN_24

But to use them the following code must be changed in the LCDconf.c:

static inline U32 LCD_LL_GetPixelformat(U32 LayerIndex)

{

  if (LayerIndex == 0)

  {

    return LTDC_PIXEL_FORMAT_ARGB8888;

  } 

  else

  {

    return LTDC_PIXEL_FORMAT_ARGB1555;

  } 

}

change them to:

static uint32_t LCD_LL_GetPixelformat(uint32_t LayerIndex)

{

  const LCD_API_COLOR_CONV * pColorConvAPI;

  if (LayerIndex >= GUI_NUM_LAYERS) 

  {

    return 0;

  }

  pColorConvAPI = layer_prop[LayerIndex].pColorConvAPI;

  

  if (pColorConvAPI == GUICC_M8888I) 

  {

    return LTDC_PIXEL_FORMAT_ARGB8888;

  } 

  else if (pColorConvAPI == GUICC_M888) 

  {

    return LTDC_PIXEL_FORMAT_RGB888;

  } 

  else if (pColorConvAPI == GUICC_M565) 

  {

    return LTDC_PIXEL_FORMAT_RGB565;

  } 

  else if (pColorConvAPI == GUICC_M1555I) 

  {

    return LTDC_PIXEL_FORMAT_ARGB1555;

  } 

  else if (pColorConvAPI == GUICC_M4444I) 

  {

    return LTDC_PIXEL_FORMAT_ARGB4444;

  } 

  else if (pColorConvAPI == GUICC_8666) 

  {

    return LTDC_PIXEL_FORMAT_L8;

  } 

  else if (pColorConvAPI == GUICC_1616I) 

  {

    return LTDC_PIXEL_FORMAT_AL44;

  } 

  else if (pColorConvAPI == GUICC_88666I) 

  {

    return LTDC_PIXEL_FORMAT_AL88;

  }

  while (1);

}