cancel
Showing results for 
Search instead for 
Did you mean: 

Some kind of Tearing Effect with LCD_DSI_VideoMode_DoubleBuffering Example

S.K.Matters
Associate II

I have slightly modified the LCD_DSI_VideoMode_DoubleBuffering Example for the STM32F769-DISCO Board to see the behaviour when switching the video buffer at every Frame. The display is the standart DSI display (B-LCD40-DSI1) delivered with the DISCO kit. In the code I first preset 8 video-buffers with some pattern in the SDRAM, and on every HAL_LTDC_LineEventCallback, the CFBAR register is set to the next buffer.

Now I get some kind of diagonal tearing or shift effect, eventough the buffer-switching is theoretically synced to LTDC Line 0. You can see the effect in the attached picture.

Does anyone have an Idea, what is causing this effect and how this could be prevented?

2 REPLIES 2
N. SANTINI
ST Employee

Hi,

This effect is very specific to the DSI communication and the chosen screen's scanning order.

To be short the frame buffer's origin is not the same as the origin of the display panel.

Imagine the LTDC sending the frame buffer reading it from "X" and then line by line

X--->---------------

| |

| |

---------------------

At the same time the display internally update the pixels but in this manner :

X--->-----

| |

| |

| |

| |

----------

Then the LTDC update, even isynchronized on lineEvent callback will update pixels that are currently shown on screen, because a line for the LTDC is not a line for the display panel.

The solution to that is to configure the LTDC to process the frame buffer as 2 zones. That is why you see a 400 pixels width in the LTDC configuration and not 800 as it should be.

I recommend you to check that you did not break this mecanism during your code modification of the example.

Best regards,

Nicolas

S.K.Matters
Associate II

Hi Nicolas

I really appreciate to get an answer to this question!

I think I understand your explanation, but I don't understand yet, how exactly your proposition is applicable to the LCD_DSI_VideoMode_DoubleBuffering Example.

The only changes I applied to the initially attached Main.c, contain the buffer-preset and the buffer updates of the LCD_DSI_VideoMode_DoubleBuffering Example example.

Can 2 different zones be handled in the DSI Burst mode?

Thanks and best regards

SK