cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H747I-DISCO tearing in double buffering

AWang.8
Associate

Hello all,

I have been trying to get the discovery board working in video mode with double buffering example working but have had no luck. I tried three different projects, the really old one from some release from two years ago, the 1.11.0 release, and the 1.11.1 release (a patch to the 1.11.0 release which seem to have added additional files relating to the display, i.e., nt35510.c, though I don't understand how this works since there's also the OTM8009A which I've copied from the previous release 1.11.1). None of these projects seem to give the expected behavior and frustratingly still results in tearing.

AWang8_0-1709746427400.png

This is captured on my phone, what's shown below is played back at 960 FPS (I think, might be half of that). It seems to update the screen very quickly, faster than what my camera can capture, but bafflingly, does it in two diagonal halves.

If I understand the project correctly, once the buffer is prepared, the LTDC hardware is pointed to the address of the new buffer by a single change in pointer, and the LTDC runs continuously by scanning the buffer repeatedly and outputing the highspeed DSI data as it does not have a separate buffer. This change in pointer should be extremely fast.

What's also odd to me is that the buffers are initialized to an unexpected size and not 800*480*4 (resolution of the screen and 32 bits per ARGB8888 pixel).

AWang8_1-1709747336020.png

Could someone please give some ideas of what's going on? Is this a driver issue? I also had no idea how to patch the 1.11.1 patch to CubeMX and had to manually patch it (generate new project using 1.11.0 and then add in the files to a project that's manually extracted from the 1.11.1 patch)

The demo seems to have no similar tearing problems so the hardware should be capable of generating a tearing free viewing experience.

(keywords for future people experiencing similar issues: LTDC, DSI, DISCO, NT35510, OMT8009A)

7 REPLIES 7
KDJEM.1
ST Employee

Hello @AWang.8 ,

One of the following flags must be enabled in stm32h747i_discovery_conf.h file options in order to select the target daughter board revision connected on STM32H747I DISCOVERY :

- USE_LCD_CTRL_OTM8009A : Applicable for all LCD daughter boards (MB1166) except for Rev -A09/A03 , it is defined as follows :

 

#define USE_LCD_CTRL_OTM8009A 1U

#define USE_LCD_CTRL_NT35510 0U

 

- USE_LCD_CTRL_NT35510 : Applicable only for LCD daughter boards (MB1166) Rev -A09/A03 , it is defined as follows :

 

#define USE_LCD_CTRL_OTM8009A 0U

#define USE_LCD_CTRL_NT35510 1U

 

 

>>I also had no idea how to patch the 1.11.1 patch to CubeMX

Could you please download and install the last version of STM32CubeMX, then click on help->Manage embedded software packages.

KDJEM1_0-1713799474041.png

Then select STM32CUBE MCU package for STM32H7 Series version 1.11.2 and install it.

KDJEM1_1-1713799560217.png

KDJEM1_2-1713799906498.png

 

To check the issue could you please precise:

  • Which STM32H747I-DISCO revision are you using? MB1248-H747I-D02, MB1248-H747I-D03 ...?
  • Which LCD revision are you using? MB1166 A-02, A03, A09.....?

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi KDJEM.1

Probably, your information is outdated. I have exactly the same issue with the newest CUBE-H7 (1.11.2) and set define USE_LCD_CTRL_NT35510 (actually, that define is of no use as it appears only once in the project - only in stm32h747i_discovery_conf.h). The main board is D03, the display board is A09, bought recently at mouser (with completely empty flash i.e. without demo firmware).

lcd_tearing2b.png

Also there is an issue with TouchGFX demo (tried compiled hex file and built from source as well).

TGfx_issue.jpg

Seems like the board/screen weren't fully tested as well as the examples (see the red line on the first screenshot - I had to correct main.c in order to bring it on the screen).

KDJEM.1
ST Employee

Hello @Alekseus ,

Thank you for sharing these furthermore information.

I reported LCD_DSI_VideoMode_DoubleBuffering example issue internally.

About the Demo, it is mentioned in UM2411, for DK32H747I$AT2 product identification, that No demonstration software is provided for this product identification.

KDJEM1_0-1714384150550.png

 

Internal ticket number: 180253 (This is an internal tracking number and is not accessible or usable by customers).

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Richard-CRT
Associate III

I have this exact same graphical issue with my STM32F469I-DISCO DK32F469I$AU1 using the LCD_DSI_VideoMode_DoubleBuffering example for that board.

It appears not to be a new issue for that dev board (see below links), but it's still not fixed. I'm about to create my own ticket for the problem.

https://community.st.com/t5/stm32-mcus-touchgfx-and-gui/some-kind-of-tearing-effect-with-lcd-dsi-videomode/td-p/398477

https://community.st.com/t5/stm32-mcus-touchgfx-and-gui/stm32f469i-disco-screen-tearing-on-double-buffer-example/m-p/668979#M37372

 

Yes, I have seen these. Seems like that display is of poor quality or DSI peripheral is poorly designed (sort of incompatibility or whatever). That is crazy, change of the frame address causes so slow picture update, easily visible with the naked eye, whereas it should be instantaneous.

KDJEM.1
ST Employee

Hello,

To avoid the tearing issue, could you please try to use a portrait mode or a partial refresh with landscape mode based on LCD_DSI_CmdMode_PartialRefresh 

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Alekseus
Associate II

Hi. Thank you.

It's all right with a portrait mode. But I am really interested in landscape video mode.