2026-02-24 7:26 AM - last edited on 2026-02-24 7:42 AM by Andrew Neil
Hi,
I'm using TouchGFX to make a simple screen with just one slider. This to prove my graphics work and i can use touch to move the slider.
I started with a CubeMX project this time but i got stuck somewhere.
I enabled DMA2D and touchGFX.
I see the DMA2D IRQ's passing by and My frame buffers are swapping when i touch the screen.
I see that I get calls to HAL_LTDC_LineEventCallback so I think hltdc is working as well.
But i see that my images that should be drawn on my screen are not there. I see the global layout of the slider but it is not the correct image.
Steps to reproduce:
1) start a new TouchGFX 4.26.0 project
2) disable all frameworks in config page
3) Set a Box with a specific color (not black)
4) Add a simple slider to the canvas
5) run the simulator
In the simulator i now see the same issue I see on My device. When I re-enable the Config->FrameworkFeatures. I get a working simulator but on my embedded device the images stay wrong.
I have tried everything and checked everything i can think of but I can't make it correct.
My screen uses LCD16BPP,My device uses a STM32H750.
My framebuffers are working as i can see the layout of the slider and i can touch the slider and see the second framebuffer become active. I've set both framebuffers with different colors before starting TouchGFX and the slider switches between those colors. while the BOX stay's the correct color.
Does anybody has an Idea on what to check here?
Thanks
2026-02-25 5:15 AM
When I come into the function
inline uint32_t STM32DMA::getChromARTOutputFormat(Bitmap::BitmapFormat format)
I see that the given format is ARGB8888 while I have a 16BPP display. I Configure everything correct i assume. but still I end with the wrong format.
I don't know what to check anymore. Below is the call stack up untill the first request of the getChromARTOutputFormat
In STM32CubeMX I have set
1) the LTDC display type to RGB565 (16 bits)
2) The framebuffer Pixel Format for TouchGFX also on RGB565
3) The DMA2D is activated, I get IRQ's so My DMA is running.
4) I also get HAL_LTDC_IRQHandler calls.
5) I see when touching my display that the framebufffers switch.
6) I see that the blitOp.pDst is always in one of the 2 defined framebuffer address ranges (0x24000000 - 0x2407F800) ((480*272*2) *2)
7) strange is that blitOp.pSrc is always 0x0 ??? but it is never used as far as I can see.
STM32DMA::getChromARTOutputFormat@0x90001e8c (\26014\TouchGFX\target\generated\STM32DMA.cpp:121)
STM32DMA::setupDataFill@0x900021da (\26014\TouchGFX\target\generated\STM32DMA.cpp:343)
touchgfx::DMA_Interface::addToQueue(touchgfx::BlitOp const&)@0x9001400c (Unknown Source:0)
touchgfx::HAL::blitFill(touchgfx::colortype, unsigned short, unsigned short, unsigned short, unsigned short, unsigned char, unsigned short, touchgfx::Bitmap::BitmapFormat, bool)@0x90013bde (Unknown Source:0)
touchgfx::HAL::blitFill(touchgfx::colortype, unsigned short, unsigned short, unsigned short, unsigned short, unsigned char, bool)@0x900137ac (Unknown Source:0)
touchgfx::LCD16bpp::fillRect(touchgfx::Rect const&, touchgfx::colortype, unsigned char)@0x9001d31c (Unknown Source:0)
touchgfx::Box::draw(touchgfx::Rect const&) const@0x900140fc (Unknown Source:0)
touchgfx::Screen::JSMOC(touchgfx::Rect const&, touchgfx::Drawable*)@0x90017170 (Unknown Source:0)
touchgfx::Screen::JSMOC(touchgfx::Rect const&, touchgfx::Drawable*)@0x9001708c (Unknown Source:0)
touchgfx::Screen::startSMOC(touchgfx::Rect const&)@0x900171ca (Unknown Source:0)
touchgfx::Screen::draw(touchgfx::Rect&)@0x900171f2 (Unknown Source:0)
touchgfx::Application::draw(touchgfx::Rect&)@0x90015524 (Unknown Source:0)
touchgfx::Application::drawCachedAreas()@0x90016582 (Unknown Source:0)
touchgfx::HAL::tick()@0x9001343e (Unknown Source:0)
touchgfx::HAL::backPorchExited@0x9000138e (\26014\Middlewares\ST\touchgfx\framework\include\touchgfx\hal\HAL.hpp:688)
touchgfx::HAL::taskEntry()@0x900132c6 (Unknown Source:0)
touchgfx_taskEntry@0x90000efe (\26014\TouchGFX\target\generated\TouchGFXConfiguration.cpp:73)
GuiTask@0x900029ec (\26014\Core\Src\AppMain.c:83)
pxPortInitialiseStack@0x900083c4 (\26014\Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM4F\port.c:214)
2026-02-25 6:06 AM
When i set my framebuffer to single framebuffer like:
setFrameBufferStartAddresses((void*)frameBuf, nullptr, (void*)0);
I see the correct images but I get a Hard Fault now. I don't know what is the relation between those 2 things:
My call stack is:
HandleHardFault@0x9000d644 (\26014\lib-source\lib\434\core\SysInt.c:267)
<signal handler called>@0xfffffffd (Unknown Source:0)
memcpy@0x90026f86 (Unknown Source:0)
prvCopyDataFromQueue@0x90005f34 (\26014\Middlewares\Third_Party\FreeRTOS\Source\queue.c:2166)
xQueueReceive@0x90005968 (\26014\Middlewares\Third_Party\FreeRTOS\Source\queue.c:1312)
osMessageQueueGet@0x90007eea (\26014\Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS_V2\cmsis_os2.c:1819)
touchgfx::OSWrappers::waitForVSync@0x90002568 (\26014\TouchGFX\target\generated\OSWrappers.cpp:117)
??@0x00200050 (Unknown Source:0)Does this Queue means anything in relation to the Framebuffer now being a single framebuffer instead of 2?
2026-02-26 12:50 AM
Hello @SCous.1.
Even when following your steps, I am unable to reproduce the issue. Can you share your project?
Best regards,
Johan
2026-04-09 12:14 AM
Seems I had done something wrong and fixed it now unaware of why it is fixed. I don't know what went wrong here but it is resolved...