2020-03-05 08:43 AM
Helllo!
I use development board with F769 and 32-bit sdram
I see artifacts - stripes on both sides of pictures
Artifacts a dissapear when I use 16 bit SDRAM mode. Artifacts are disappear then I use RBG565
But I want 32-bit SDRAM and RGB888
What I try to do - I try to work without touchGFX
void STFT_FillRectangle(uint16_t x1, uint16_t y1,
uint16_t x2, uint16_t y2, uint32_t color)
{
#define swap(a,b) {int16_t t=a;a=b;b=t;}
if(x1>x2) swap(x1,x2);
if(y1>y2) swap(y1,y2);
uint32_t addr=0;
SCB_CleanDCache();
addr = 0xD0000000 + 3*(y1*hltdc.LayerCfg[0].ImageWidth+x1);
hdma2d.Init.Mode = DMA2D_R2M;
hdma2d.Init.OutputOffset = hltdc.LayerCfg[0].ImageWidth - (x2-x1);
if(HAL_DMA2D_Init(&hdma2d) == HAL_OK)
{
if(HAL_DMA2D_Start_IT(&hdma2d, color, addr, x2-x1, y2-y1) == HAL_OK)
{
HAL_DMA2D_PollForTransfer(&hdma2d, 10);
}
}
SCB_InvalidateDCache();
}
But artifacts (stripes) still present.
What can I see in memory, when I try to fill by color 0x0000FF
First bytes are broken
Help me!
P.S. IMPORTANT! These errors I see when I use DMA2D.
If I write and read to SDRAM without DMA2D - all OK.
2020-03-05 10:10 AM
I wouldn't use SCB_InvalidateDCache() blindly, use the by address version if you must.
Shouldn't need for DMA Read from memory.
2020-03-05 10:15 AM
Hm... I can't understand you.
Can you say in other words?
Why not need DMA? DMA is used in TOuchGFX.
SCB_InvalidateDCache() - is used in touchgfx library in file "STM32DMA......"
2020-03-07 07:26 AM
No answers?