cancel
Showing results for 
Search instead for 
Did you mean: 

using TouchGFX on stm32h747 with video mode & display with no Gram

yuval
Associate II

Hi,

After creating a project by touchgfx designer for stm32h747 it work fine with ST display.

I'm using a display with no Graphic ram and it work only with video mode.

my display work fine with a single buffer video mode example.(after a minor change)

For touchGFX designer project with stm32h747 I did changes in stmcudeMX to adapt to video mode but my display didn't show anything.

After digging in code:

1)using a debugger I didn't see any call for:

enableLCDControllerInterrupt()

2)

in main task , i didn't exit from: OSWrappers::waitForVSync();

i found waitForVSync() exit by HAL_DSI_TearingEffectCallback()

But tearing effect is happened for my understanding in command mode with display which include gram

not for video mode.

I wonder if touchGFX initialization work with video mode for stm32h747?

I found a forum which having stm32f and work with video mode, I saw a line callback but not tearing effect.

should I mask tearing effect callback and add manually line callback?

In general I'm trying to adapt stm32h747 touch GFX designer project to work with video mode. if any instructions or what manually I should do? (I found few example but for stm32f series )

BR yuval

1 ACCEPTED SOLUTION

Accepted Solutions
yuval
Associate II

Hi ,

Finally the display is working as expected.

I had wrong configuration :

I changed

pLayerCfg.PixelFormat = LTDC_PIXEL_FORMAT_ARGB8888 ;

to

pLayerCfg.PixelFormat = LTDC_PIXEL_FORMAT_RGB888;

Than the display work as I expected.

(According to Display manual it work with ARGB8888 so I don't know why but touchGFX work when change back PixelFormat to RGB888 even simple image copy work fine with ARGB8888)

So general steps are:

I started with touchGFX designer for stm32h747:

1)In STMCUBEMX , DSIHOST - video mode

2) display interface - burst mode

3)touchgfx to Parallel RGB(LTDC)

4) add manually HAL_LTDC_LineEventCallback

5) remove manually TR callback

6)config correctly pll3 & DSI pll

7)config correctly all video & ltdc parameters (V,H BP,FP , ...)

8)external buffer is sdram 0xd000000 (already from example)

9)remove code related with OTM8009A (it is not my display - i do not have internal gram)

I add my project so others can use stm32h747 with touchGFX and video mode.

View solution in original post

7 REPLIES 7
MM..1
Chief II

For DSI displays isnt this trivial. But basic steps:

  1. Open MX wizard for project and configure video mode in DSI
  2. Reconfig TouchGFX part from CUSTOM to LTDC in both settings.
  3. Generate new code twice and too regenerate TouchGFX tartget code.
  4. Edit display setup func for init video mode

Use HAL test pattern func to test LCD.

Alexandre RENOUX
Principal

Hello yuval,

What MM..1 says is correct.

What needs to be understood here is that DSI Video Mode is similar to simply using LTDC except that you add the DSI layer which only receives from LTDC and sends to the display in a serial fashion.

Therefore, the tick source is the HAL_LTDC_LineEventCallback, which is why in TouchGFX Generator you set everything the same as when you use a standard LTDC. Therefore, HAL_DSI_TearingEffectCallback() should not be part of your code.,

The main change is the initialization of the DSI in CubeMX.

/Alexandre

yuval
Associate II

0693W00000HppjbQAB.jpgThanks for you response.

I'm using LCD-MIPI example I found in forums for using video mode.

Also using some code parts from single buffer video mode ST example.

I changed the background to green and it look fine.

I'm using UTIL_LCD_Clear(UTIL_LCD_COLOR_GREEN); function.

Next, I'm using touchGFX.

The problem (seen in the picture attached), I'm getting a repeated graphics images.

when I'm using touchGFX with command mode (TE callback / not line callback)

and using ST display I'm getting fine picture.

I'm trying to think what I'm doing wrong.

Thank for your response.

I add below the display image .

It look I have some progress but still have to understand the repeated image below.

Alexandre RENOUX
Principal

Hello yuval,

Testing with a single color without TouchGFX is a start but not enough to make sure your initialization is correct.

Are you sure your clocks are correctly set ? This could be a reason to this kind of effect.

For DSI Video Mode, clocks are very important. You can try to reduce the LTDC clock for instance to see if there is any difference.

You can also make sure your STM32TouchGFXHAL.cpp and .hpp files are the same (which means mostly empty) as an LTDC project like the TBS for F746-DISCO available in the Designer.

/Alexandre

yuval
Associate II

Hi ,

Finally the display is working as expected.

I had wrong configuration :

I changed

pLayerCfg.PixelFormat = LTDC_PIXEL_FORMAT_ARGB8888 ;

to

pLayerCfg.PixelFormat = LTDC_PIXEL_FORMAT_RGB888;

Than the display work as I expected.

(According to Display manual it work with ARGB8888 so I don't know why but touchGFX work when change back PixelFormat to RGB888 even simple image copy work fine with ARGB8888)

So general steps are:

I started with touchGFX designer for stm32h747:

1)In STMCUBEMX , DSIHOST - video mode

2) display interface - burst mode

3)touchgfx to Parallel RGB(LTDC)

4) add manually HAL_LTDC_LineEventCallback

5) remove manually TR callback

6)config correctly pll3 & DSI pll

7)config correctly all video & ltdc parameters (V,H BP,FP , ...)

8)external buffer is sdram 0xd000000 (already from example)

9)remove code related with OTM8009A (it is not my display - i do not have internal gram)

I add my project so others can use stm32h747 with touchGFX and video mode.

Alexandre RENOUX
Principal

Hello yuval,

Very happy to hear that it works now ~

And thank you for sharing your code ! It will surely help others.

Please close this topic by choosing your last message as Select as Best ^^

/Alexandre