2021-03-04 01:44 PM
The MCU is STM32H743. In CubeMX LTDC settings, I have set the framebuffer address as 0x3000000, and selected buffering strategy and buffer location as "Single" and "Allocate" respectively inb TouchGfx. Also, in main.c I've declared an array
uint16_t framebuffer[100*100];
and set the framebuffer address to this array with
HAL_LTDC_SetAddress(&hltdc, framebuffer, LTDC_LAYER_1);
The display is 640x480, and all that is shown in the display is the backgorund color and a 100x100 black square.
I suspect the framebuffer addess is not understood by TouchGfx. What can I do correctly link the two framebuffer address?
Thanks,
E
2021-03-05 12:27 AM
Hi,
The function setFrameBufferStartAddresses() in TouchGFXGeneratedHAL.cpp in the TouchGFX/target/generated folder might be what you are looking for. You can overwrite this function in the TouchGFXHAL::initialize() function in TouchGFXHAL.cpp to be sure that your framebuffer is at the right address if you wish as well.
By the way I believe the framebuffer should be Width * Height * Bpp/8 rather than what you have put.
/Romain
2021-03-07 12:22 AM
Thank you very much for your answer.
2021-12-23 11:34 AM
As the buffer has been defined "uint16_t", it would be enough to say [W*H] only for rgb565, which needs 2 bytes for each pixel.