cancel
Showing results for 
Search instead for 
Did you mean: 

Error in LTDC Rendering on STM32H7 Internal RAM vs External RAM

LIver.1
Associate II

So I've been facing a strange error where rendering pixels within my internal RAM works without issue, E.G I can fill a frame buffer at the proper length and it fits each pixel to each correct location on the screen as expected. I've been able to render full images this way.

For some reason though when implementing the same functionality on my SDRAM located at address 0xC0000000 the first 50 or so pixels render without error but once it reaches a particular width, generally around 100, the pixels begin to get stretched, as in black pixels are being replaced by white ones several pixels to the right and this continues to get worse as you go along until they're being placed in completely incorrect locations.

Initially I assumed this had to do with my actually writing to memory, as in I was overwriting the same address or jumping ahead for some reason. After going through the memory inspector I've confirmed that the memory is being written correctly at each address and is not overwriting or jumping ahead.

This has left me stumped and either forced to look for a different screen/board or to rework my GPU driver to only utilize internal ram which I'd like to avoid. Is this most likely an issue with my screen? The only reason I'd find this surprising is that I can place a full image in flash and reference it and it renders fully without issue. I also doubt its my SDRAM driver I wrote as I know the information being written is arithmetically accurate?

Really stumped here could use a push in the right direction.

Memory after rendering the first 50 pixels

 0693W00000ANbYLQA1.pngMemory after rendering 100 pixels

 0693W00000ANbYVQA1.png 

Photo of screen rendering 50 Pixels

0693W00000ANbWtQAL.jpgPhoto of screen rendering 100 Pixels

0693W00000ANbWyQAL.jpg It might be hard to see in the second picture but the scale is obviously wrong and if I had a gif you'd see the line is jumping right then back again then right constantly in a weird dithering pattern.

This is all im doing to render the image. Switching the address to 0x24000000(internal ram) renders the line without a single problem.

for(int i = 0; i < 100; i++){
	  *(uint32_t*)(0xC0000000U+(i*4)) = 0xFFFFFFFF;
  }

0 REPLIES 0