cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong framebuffer size for display on STM32F769 DISCOVERY board

kaihaacks
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
MM..1
Chief II

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.

View solution in original post

2 REPLIES 2
MM..1
Chief II

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
Associate II

Thanks a lot for the clarification