Skip to main content
kaihaacks
Associate
February 26, 2022
Solved

Wrong framebuffer size for display on STM32F769 DISCOVERY board

  • February 26, 2022
  • 2 replies
  • 970 views

Hello,

it seems to me, that cubemx uses a too small framebuffer for the display on the STM32F769 DISCOVERY board. The Display has 800 by 480 pixel but the real size used by the DMA is for 832 by 480. I guess that has to do with the HSYNC, horizontal front and back porch.

The problem is, that when you have your framebuffer together with other data in the same memory the dma possibly overwrites parts of other data because of a too small defined framebuffer.

If I manually change the settings in the TouchGFXGeneratedHAL.cpp

LOCATION_PRAGMA("TouchGFX_Framebuffer")

uint32_t frameBuf[(832 * 480 * 2 + 3) / 4]

LOCATION_ATTRIBUTE("TouchGFX_Framebuffer");

it will be overwritten next time you save cubemx settings. If you change it in the cubemx TouchGFX Generator, the framebuffer will be right, but the TouchGFX functions add another 32 pixel to the 832 pixel.

Are there any settings I have missed to solve this problem?

Best Regards,

Kai

This topic has been closed for replies.
Best answer by MM..1

Framebuffer dont rel to HSYNC etc. Is based on LTDC layer size config. As described in optimize LTDC memory access appnote sometimes is good to use dummy pixels in buffer.

2 replies

MM..1
MM..1Best answer
Super User
February 26, 2022

Framebuffer dont rel to HSYNC etc. Is based on LTDC layer size config. As described in optimize LTDC memory access appnote sometimes is good to use dummy pixels in buffer.

kaihaacks
kaihaacksAuthor
Associate
February 26, 2022

Thanks a lot for the clarification