cancel
Showing results for 
Search instead for 
Did you mean: 

F746G Discovery: dark grey screen caused by MX_TouchGFX_Init()

AFire.1
Associate II

Hi,

I wanted to configure my F746G Discovery board with LTDC and TouchGFX using framebuffer in internal RAM from scratch. So I configured LTDC based on scheme provided and it works perfectly fine. I am able to display and switch solid colors, display static image from .h file.

Then I wanted to make TouchGFX work, but after calling MX_TouchGFX_Init() it will just display dark grey screen, without calling it I can display at least static content normaly.

LTDC_IRQHandler is being called periodically and framebuffer is declared and set this way:

uint16_t framebuffer[480*272];

HAL_LTDC_SetAddress(&hltdc, framebuffer, LTDC_LAYER_1);

Something is probably miss-configured with TouchGFX and I can´t figure out what it is. Thanks for any help!

3 REPLIES 3
Romain DIELEMAN
ST Employee

Hi,

In the TouchGFX configuration you have not set a StartAddress for the framebuffer, so the setFramebufferStartAddresses() function in TouchGFXGeneratedHAL.cpp in the TouchGFX/target/generated folder will not work.

/Romain

Thank you for reply, I solved it with following code in main:

__attribute__ ((section(".TouchGFX_Framebuffer"), used))

uint32_t framebuffer[400*200];

However this is working without OS, with CMSIS OS, this is not working for some reason.

Do you have any idea how to refer to framebuffer placed in internal memory using OS? Thank you!

by the way for the framebuffer I would suggest to allocate Width*Height*bpp/8 instead of just Width*Height