2021-06-02 03:43 AM
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!
2021-06-02 11:48 PM
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
2021-06-03 12:32 PM
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!
2021-06-04 12:26 AM
by the way for the framebuffer I would suggest to allocate Width*Height*bpp/8 instead of just Width*Height