Skip to main content
Slh
Senior
November 26, 2020
Question

Problem with Updating Frame buffer of LTDC

  • November 26, 2020
  • 4 replies
  • 1476 views

When I update the LTDC Frame buffer, showing the display has problem.

I use DMA2D and FBAdress located in external SDRAM.

I write in pixels as follows (e.g. 1000 Pixels):

__IO uint32_t* Address = (uint32_t*) 0xC0000000;
__IO uint32_t Data = 255;
while(1)
{
 
 for (int var = 0; var < 1000; ++var)
 {
 
	 *(__IO uint32_t*) (Address + var) = Data ;
 }
 
 osDelay(10);
}

While writing in the for loop, the display is as follows:

0693W000005Cjp3QAC.jpgAnd when the writing operation is finished, the displaying is without any problems.

How can I update the Frame Buffer without such a problem?

This topic has been closed for replies.

4 replies

MM..1
Super User
November 26, 2020

Where you here use DMA? And FYI LTDC access RAM and copy it to buffer, and for this need time. When you access same ram in while 1 at max mcu speed , then exist conflict. For best result you need double buffer , but here is other trouble you need all graphics write to memory twice.

Try insert in for us delay ...

And simpler way is use TouchGFX engine.

Slh
SlhAuthor
Senior
November 27, 2020

I tried delay and it should be at least 20 milliseconds per pixel so that there is no effect on the lcd, which is a lot time.

In document AN4861 I saw that:

0693W000005Cqi9QAC.pngAnd when can I get the "blanking period" time or with which Function can I access it? For example something like this:

while("blanking period")

{

write in Pixel

}

MM..1
Super User
November 27, 2020

Your refresh rate must be very high. Normal app need setup refresh rate to values, that result memory is accessible and ltdc work

But whe you overdrive this, result is you can change graphics only in blanking period. This is controlled with LTDC IRQ.

And i repeat , dont try write , what exist = TOUCHGFX.

Slh
SlhAuthor
Senior
November 27, 2020

I found the reason and it was the speed of the LCD clock. When I set it to less than 27MHz, it is no longer a problem. But it also depends on the Main Clock and the SDRAM clock speed.