2020-11-26 02:29 AM
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:
And when the writing operation is finished, the displaying is without any problems.
How can I update the Frame Buffer without such a problem?
2020-11-26 08:39 AM
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.
2020-11-27 12:19 AM
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:
And 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
}
2020-11-27 06:21 AM
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.
2020-11-27 06:27 AM
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.