cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX, CubeMX, 469 Discovery board displays garbage.

DTopi
Associate

Platform: 469 DISCO board

Compiler: gcc

IDE: CubeMX 5.0.1 for code generation, AC6 for compilation, TouchGFX 4.10.0

I created the application using the above mentioned tools. From the TouchGFX editor, I added a line widget. This works fine in simulation, but on hardware the TFT shows garbage.

If I create project directly from TouchGFX (without using CubeMX) and deploy to the board, the GUI works fine.

Now, I looked the generated code from both the cases, TouchGFX only and CubeMX + TouchGFX combination. The generated code is vastly different.

The major difference being the firmware package version.

The code generated by TouchGFX uses a 4 years old version (V1.5.0) from Dec2015, and CubeMX uses the latest version (V1.23.0).

There seems to be a disconnect between TouchGFX projects and CubeMX projects.

I am not sure, how to go about setting up the development environment?

Any help? How to go about this?

Thanks,

-Deven

4 REPLIES 4
Martin KJELDSEN
Chief III

Hi @DTopi​,

The Application Templates you're using through the Designer do not get their Cube FW updated on new releases, so they may be old yes. The reason you're seeing a big difference in project structure is because the old templates from the designer are not generated with CubeMX (integration between TouchGFX and CubeMX happened in CubeMX 5.0.0).

The integration is not entirely smooth, which is why we've done some additional work in some of the designer application templates (E.g. F746-DISCO, F769-DISCO, F750-DISCO). We still haven't done the work for F469-DISCO so the CubeMX generated project you have may be experiencing some issues.

It's on the list for things to do the next few sprints while we continuously improve integration with TouchGFX.

Stay tuned!

Best regards,

Martin

So for now there is no way we can use F469-DISCO on CubeMX combining with TouchGFX?

https://touchgfx.zendesk.com/hc/en-us/articles/360020208091-Configuring-STM32F769I-DISCO

I tried to follow this doc cause these two boards have the same LCD,but i only got half of the screen working fine.I think i'm on the right way ,but just can't get there.Pics shown below.

Any time schedule about fixing this?

0690X000008A3AAQA0.jpg0690X000008A397QAC.jpg

FDi I
Associate II

Hi @QZ Lee​ it wasn't easy, but I was able to use CubeIDE and TouchGFX togheter for the STM32F469I-DISCO.

I hope I will have time to prepare a short guide.

Coming back to your problem I suppose that it is due to :

 HAL_LTDC_SetPitch(&hltdc, 400, 0); -> must be set to 800

so to fix the problem use these settings in file HW_Init.cpp :

void MX_LCD_Init(void) 

{

 LTDC_LayerCfgTypeDef       pLayerCfg;

/* De-Initialize LTDC */

 HAL_LTDC_DeInit(&hltdc);

/* Configure LTDC */

 hltdc.Instance = LTDC;

 hltdc.Init.HSPolarity = LTDC_HSPOLARITY_AH;

 hltdc.Init.VSPolarity = LTDC_VSPOLARITY_AH;

 hltdc.Init.DEPolarity = LTDC_DEPOLARITY_AL;

 hltdc.Init.PCPolarity = LTDC_PCPOLARITY_IIPC;

 hltdc.Init.HorizontalSync = 1;

 hltdc.Init.VerticalSync = 1;

 hltdc.Init.AccumulatedHBP = 2;

 hltdc.Init.AccumulatedVBP = 2;

 hltdc.Init.AccumulatedActiveW = 402;

 hltdc.Init.AccumulatedActiveH = 482;

 hltdc.Init.TotalWidth = 403;

 hltdc.Init.TotalHeigh = 483;

 hltdc.Init.Backcolor.Blue = 0;

 hltdc.Init.Backcolor.Green = 0;

 hltdc.Init.Backcolor.Red = 0;

 if (HAL_LTDC_Init(&hltdc) != HAL_OK)

 {

  Error_Handler( );

 }

 pLayerCfg.WindowX0 = 0;

 pLayerCfg.WindowX1 = 400;

 pLayerCfg.WindowY0 = 0;

 pLayerCfg.WindowY1 = 480;

 pLayerCfg.PixelFormat = LTDC_PIXEL_FORMAT_RGB888;

 pLayerCfg.Alpha = 255;

 pLayerCfg.Alpha0 = 0;

 pLayerCfg.BlendingFactor1 = LTDC_BLENDING_FACTOR1_PAxCA;

 pLayerCfg.BlendingFactor2 = LTDC_BLENDING_FACTOR2_PAxCA;

 pLayerCfg.FBStartAdress = 0xC0000000;

 pLayerCfg.ImageWidth = 400;

 pLayerCfg.ImageHeight = 480;

 pLayerCfg.Backcolor.Blue = 0;

 pLayerCfg.Backcolor.Green = 0;

 pLayerCfg.Backcolor.Red = 0;

 if (HAL_LTDC_ConfigLayer(&hltdc, &pLayerCfg, 0) != HAL_OK)

 {

  Error_Handler( );

 }

 HAL_LTDC_SetPitch(&hltdc, 800, 0);

}

Please, let me know if it works.

Hey, Can you please share how did you do it? I have the same f469-disco board and I want to use cubemx + TouchGFX . It would be great if you share the steps.