cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Updating Frame buffer of LTDC

Slh
Senior

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?

4 REPLIES 4
MM..1
Chief II

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.

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

}

Slh
Senior

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.

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.