2026-02-27 12:25 PM
I'm trying to use LCD16DebugPrinter to display debug text on a 480x480 RGB565 display running on STM32U5A9J-DK (circular display). I've set it up in TouchGFXHAL::initialize():
static touchgfx::LCD16DebugPrinter debugPrinter;
debugPrinter.setPosition(0, HAL::DISPLAY_HEIGHT - 20, HAL::DISPLAY_WIDTH, 20);
debugPrinter.setColor(touchgfx::Color::getColorFromRGB(0, 0, 0));
debugPrinter.setScale(1);
touchgfx::Application::setDebugPrinter(&debugPrinter);And in my view's handleTickEvent():
static char debugStr[128];
snprintf(debugStr, sizeof(debugStr), "TICK TEST");
touchgfx::Application::setDebugString(debugStr);Nothing appears on screen. Things I've already ruled out:
How it is supposed to work?
Solved! Go to Solution.
2026-03-02 3:05 AM
Thanks, also the issue seems to be adding the code to TouchGFXHAL::initialize() doesn't make it work.
Instead, following the documentation and adding it to FrontendApplication made it work. Thanks
2026-03-02 1:16 AM
You need to call the following function after every change of the debug string content.
touchgfx::Application::invalidateDebugRegion();
2026-03-02 3:05 AM
Thanks, also the issue seems to be adding the code to TouchGFXHAL::initialize() doesn't make it work.
Instead, following the documentation and adding it to FrontendApplication made it work. Thanks