STM32H743VIT6 internal RAM artifact while using it as framebuffer.
hello everyone. I've bought a board from WeAct Studio and I've successfully configured LVDC it to show a constant 16 bit image from Flash . My LCD is round and 480x480 RGB666. pixel clocks and everything is spot on. there is no image artifacts nor image shifts on the LCD. I put an image to a web site and generated some buffer like
const uint16_t image_data_480x480x16[230400] = {0x2345,,,,,, };
I use the code like this :
pLayerCfg.FBStartAdress = uint32_t) &image_data_480x480x16;
and it shows beautifully,
Before I say the problem, I have a full framebuffer and a test code is like that.
// Define LCD dimensions
#define LCD_WIDTH 480
#define LCD_HEIGHT 480
#define FBSize LCD_WIDTH * LCD_HEIGHT
#define MemSetFrameSize FBSize * sizeof(uint16_t)
// Define framebuffer
uint16_t framebuffer[FBSize];
void clearFramebuffer() {
// Set all pixels to black (color: 0x0000)
for (int i = 0; i < FBSize; i++) { framebuffer[i] = 0x0000; }
}
void FillFramebuffer(uint16_t color) {
for (int i = 0; i < FBSize; i++) { framebuffer[i] = color; }
}
and in the static void MX_LTDC_Init(void) function the framebuffer address is :
pLayerCfg.FBStartAdress = (uint32_t) &framebuffer;
The problem is this. When I want to fill the framebuffer with lets say RED or BLUE or any data.
I see artifacts on the screen. And its all random. Sometimes its like it did not set the values on some random addresses.
while(1)
{
HAL_Delay(500);
CopyBuffer(image_data_480x480x16);
HAL_Delay(500);
FillFramebuffer ( 0x0000 );
}
in this test I should see an image and black screen right ??? But after FillFrameBuffer I can see some of the old image parts
like I it skipped the for loop for some addresses.
I hope I could tell my problem to you. English is not my native language.I don't think it is about the LVDC unit.
the buffer is on RAM_D1 which is 512KB and there is no other variable on the program. This is pure LCDsetup and one image test program.
I think I could not make a proper configuration on CORTEX_M7 Area,
