How to configure LCD frame buffer to output RGB565 on STM32H745i-Discovery board
I had modified the project generated by TouchGFX Designer with STM32H750-DK template to run on STM32H745i-discovery board. Since my project has no SPI-FLASH and external SDRAM, I put Image into internal flash and use internal sram as framebuffer. By default, It works on RGB888 fine. But I want to reduce sram usage size, so want to let it works on RGB565 mode.
The modification in my project as below
1.) pLayerCfg.PixelFormat = LTDC_PIXEL_FORMAT_RGB565;
When I modify these two function setupDataCopy(), setupDataFill() in stm32dma.cpp
and force set DMA2D_RGB565 mode as below, always into DMA2D_XferErrorCallback()
HAL_DMA2D_SetMode(&hdma2d, dma2dTransferMode,
DMA2D_RGB565,
blitOp.dstLoopStride - blitOp.nSteps);
Can anyone help to teach how to set is correct?
Many thanks and Best regards
S.W.
