Discuss STM32 and TouchGFX implementations, including configuration, debugging, and optimization.
Most recent activity
Hello, I've been working on stm32u5g9j dk1 board, with a 466 * 466 oled display that I've changed.It works great with bitmap widgets, or vector widgets on a software rendering.But if I change it to hardware rendering to use neochromVG, the display only shows bitmap widgets, not vector widgets.Software vector rendering has a performance issue, so I'd like to use hardware vector rendering to look nice and smooth.I attatched main.c and ioc file. Could you please have a look into it and help me out?If you need anything more, reply me and I'll send you rest of it as soon as I can.Thank you.
Hello I have a monochrome RGB display which expects on the green pins a 8 bits grey scale value, 0x00 is black and 0xFF is white . I managed to make it work without TouchGfx, configuring LTDC with L8 pixel format on layer 0 and using a LUT (HAL_LTDC_ConfigCLUT and HAL_LTDC_EnableCLUT functions). Now I want to use the display with TouchGfx.I see I can not select a Frame buffer Pixel Format (LTDC) which would make Touch Gfx to write on frame buffer with a 8 bits grey scale format. I selected ABGR2222, in order to test and see what happened.I designed a few boxes of different grey scale on TouhGfx Designer. I generated code from TouchGfx Designer. I can see on my TouchGFXGeneratedHAL.cpp that a LCD8bpp_CLUT[] is used.The program runs and the display shows something.The problem is I can not see the whole range of 256 gray scale. It seems I only have a few of grey scales. I have an snippet which tries to show smoothly the grey scale on a box color, I only get
Hello, i see trouble with I2C HAL_I2C_Master_Transmit(&hi2c2, addr==0 ? I2C_ADDR_DACR : addr, Buff,3,5);in project with TouchGFX RTOS i have two threads. One for GUI and second is this hw I2C.On scope i see, that I2C sometimes (random) split send or receive with clock stretch and sometimes complete hang or skip bytes. How is right setup for use it in multitask envi?Seems when thread block more as timeout in this cmd , then cmd skip bytes or...Now on U5, but i mean issue is all HAL. And i ask some tips, except DMA and IT, this ofcourse can change situation.
Hello, I am a beginner developer who is new to STM32 with TouchGFX.I am currently trying to display the GUI configured in TouchGFX Designer on a custom board consisting of an STM32F429IGT6 MCU and IS42S16400J - 7TL SDRAM.I have completed all GPIO settings while reviewing the circuit diagram, and also completed settings for FMC and LTDC in CubeMX. I have also written the SDRAM initialization code in the main.c file based on the example.The issue is that the screen remains blank.After reviewing various materials, I believe the settings are correct, and I have also completed the PCB power-on test.It seems like the SDRAM is not initializing properly. Please let me know if there is anything I might have missed.
Hello, it is possible to call a function to change screens in a "stm32h5xx_it.c" file?The goal here is redirect user to a different screen globally, with no need to do this in every screen individually. This function is called in "EXTI15_IRQHandler(void)" in the same file, which is a hardware button of mine.
Hello, I need to use Touchgfx on a small CPU and I'm optimizing my code accordingly. However, in the code that Touchgfx Designer generates, I noticed something that I don't understand:The Screen classes inherit from the ScreenBase classes.The Screen classes are actually final, but they have virtual functions, which makes the compiler generate virtual tables for them. The same goes for the Listener classes. Does anyone have any ideas on this?Best regards
Hello I see on this link that Touch Gfx can only use a single layer from the LTDC.https://support.touchgfx.com/docs/development/touchgfx-hal-development/scenarios/scenarios-ltdc-parallel-rgb Is there some way of using the two LTDC's layers ?,May be is there a Topuch Gfx licensed version (not for free, paying license) which indeed can make use of the two layers ? Regards
I build a LCD driver board with STM32H750ZBT6 ,then i want to use built-in LTDC driver and SDRAM to run 480*270*16 TFT LCD panel , but touchGFX list following wrong message, where reason from ? Generate CodeGenerateDoneGenerate Assetsmake -f simulator/gcc/Makefile assets -j80 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487AllocationBase 0x0, BaseAddress 0x60EA0000, RegionSize 0x310000, State 0x10000D:\TouchGFX\4.25.0\env\MinGW\msys\1.0\bin\sh.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0simulator/gcc/Makefile:32: recipe for target 'assets' failedmake: *** [assets] Error 1FailedFailed
This is just a friendly PSA/warning to others who may be using this code: do not name any global/extern variable instances "context" if you use hardware-accelerated vector rendering. If you do, you'll probably run into strange hard faults or data corruption issues.The function `stencil_buffer_set_prealloc()` writes four bytes to the global symbol with name "context", and thanks to how library linkage works there are no errors or warnings about this collision with their intended "context" variable. The library function writes the value 0x202CCC5C in my code, and from the value (and behavior when I mess with it) this looks like a pointer to some memory in RAM. This appears to be related to vector font rendering (or possibly all vector rendering).See this relevant Stack Overflow answer for details about how this problem arises. I was not aware of this pitfall, and I will be religiously using static and name-mangling any globals from now on (I already am u
I’m working on an STM32 project using TouchGFX and STM32CubeIDE. The code compiles fine on the real target, but when I try to build the TouchGFX Simulator, I get the following error repeatedly: fatal error: i2c_data.h: No such file or directory The i2c_data.h file is present in my project under Core/Inc. It seems the simulator build does not include the folder containing i2c_data.h in its include paths.
Hi.We have an application with a touch screen and 4 physical buttons. We have designed a demonstration GIU in TouchGFX, but to allow the simulator to handle presses on the hardware buttons, we have added the hardware buttons on the display. Consequently the display is made 100 pixels higher to have room for the buttons. It works fine for the simulator, but we cannot use the GUI design as it is for building the target application.I expected that it was possible to setup the simulator to hold the hardware buttons as an addition the the application display. But apparently not. It would be nice if it was possible to design the hardware button arrangement in addition the the GUI. The buttons should of cause have a legend and the button ID in addition to the arrangement. And of cause this should not be included in the target build. But it would be nice if it could hold additional fields (e.g. text areas and radio buttons) for simulating the rest of the hardwareDid I miss something? 
I'm having a Model that receives data from the backend. I need that, according to the data received, independently of what view you're in, the presenter of the view executes a function that goes to a specific view. For instance, I'm receiving 1 in the Model, weathever the view I'm in, there will be a function in the Presenter that recieves the 1 and knows that it has to change view to the appropriate one. My function that maps the input to the view I've to change to is always the same, so I'm trying to avoid copying the whole logic in every presenter and just implement a single function that calls the bigger function that manages the logic. The idea is to create a singleton class in the common folder and use it. I was just wondering if this behavior could be achieved in some way with FrontendApplication.cpp
Hello Peeps!The ProblemI'm coming to you today with a burning question about the general workflow and best Plan of Approach when it comes to integrating TouchGFX and Ethernet (with LWIP). I've seen more posts about this subject, but none talk about the best way to go about it — instead focusing on the embedded software itself.What I've DoneUsing Berlinger's example projects and his explanation on setting up Ethernet on the H74x boards, I've managed to get Ethernet working. Or at least, the device is pingable — I haven’t touched SSL yet.I've also successfully generated a working TouchGFX project and imported it into STM32CubeIDE, after which I was able to add custom button functionality.Now comes the real challenge: combining the two of them...After tinkering with it for a few days, I've run into a few issues or difficulties, no matter which approach I try.TouchGFX → EthernetI could start with the already working TouchGFX project and integrate Ethernet that way. I've tried this. But, as
I created a new screen and added a Scroll List. Initially setting the number of items to 9 and generating.Trying understand a separate behaviour, I later changed the number of items in the scroll list in Designer to 12 and the sim crashes. It seems that the screenbase.hpp header shows the original declaration: touchgfx::DrawableListItems<ListMenuItem, 9> scrollList1ListItems;but the screenbase.cpp correctly sets the updated number of 12: scrollList1.setNumberOfItems(12); But now we seem to have an index past the array issue and it crashes:I secretly modified the read only header file to match the array size, compiled the sim outside of TouchGFX designer and it ran without errors until I regenerated in designer.The weird part is that TouchGFX designer insists of having that array still init to _9_ NO MATTER what the number of item setting is. For example, setting it 3 will still lead to 9 in screenViewBase.hpp: touchgfx::DrawableListItems<ListMenuIte
We can control the overshoot percentage of a scroll list which seems to limit how much a "pull down" is allowed and animated above the top of the list.Is there a similar thing for the bottom of the list?a way to keep the list from being scrolled past the bottom of it as it's happening in the below image? (the list contains 9 elements in total.
Hello,I’m currently working with an X-NUCLEO-GFX02Z1(ST7789V2) LCD using an 8080 parallel interface on a custom board. The LCD generally works well, but I’ve encountered some issues when the LCD fails to initialize correctly during power-on, or when it seems to reset or hang during operation (e.g., due to power glitches or signal noise). In these cases, the screen displays a corrupted image, stays blank, or becomes unresponsive.Is there a reliable way to detect whether the ST7789V2 has been reset or failed during runtime?What is the best practice to recover the LCD from this state automatically?I appreciate any suggestions, example code, or your experience in dealing with similar issues.Thanks in advance!
Hello, I have found some "typos" in TouchGFX while trying to generate code with STM32CubeMX on Linux (so with case sensitive file system). The result is that parts of the generated files "app_azure_rtos.c" and "app_azure_rtos_config.h" are missing. The missing part are the ones allocating and initializing threads for the TouchGFX application, using threadx. The root cause seems to be that the generator is including files like "RTOS_pool_create_X-CUBE-TOUCHGFX.tmp", but the actually generated file name is "RTOS_pool_create_X-CUBE-TouchGFX.tmp". It works on Windows but on Linux the file is not found and so the section contained in that tmp file is missing in the resulting code. A fix I just tested locally is to rename the tmp files which are not found to match the real pack name, which is "X-CUBE-TOUCHGFX", with all capital letters. So based on the zip file available here : https://www.st.com/en/embedded-software/x-cube-touchgfx.html , it means : - In STM32CubeMX/STMicroelectronics.
We are facing a technical issue creating a TouchGFX project. We suspect it is an inherent issue with ST’s toolchain —STM32CubeMX and TouchGFX—when used with the official STM32H757 Eval Kit.Issue at Quick Glance:1. Enabling LTDC in STM32CubeMX automatically enables DSI, even when we intend to use only RGB888 via CN20 (as in our custom display board with 10.1inch Winstar WF101JTYAHLNB0#).2. This causes build failures and prevents TouchGFX Designer from generating any GUI code, despite the project being valid and configured as per ST training examples.3. We’ve attempted all known workarounds, including patching headers and ensuring paths/configs are correct—yet the issue persists.We kindly request:1. Resolution on how to disable DSI cleanly while keeping CubeMX and TouchGFX code generation functional.2. Clarification on internal tool dependencies between LTDC and DSI, and how to bypass them for RGB-only use cases.3. A reference TouchGFX project using only RGB+LTDC (via CN20) for STM32H757
Hi Everyone,I am trying to plot the custom graph using randomly generated float values with up to 5 or 6 digits precision. Basically, I want to plot the graph for micro level data. For ex: my random float data is 0.19XXXX and my observations are like, if my 3rd digit is >= 5 then it is showing logic HIGH on the graph and if it is <5 then it is showing as logic LOW irrespective of 4th, 5th and 6th digit data. That means, if data is 0.192789 -> Low on the graph and 0.195123 -> High on the graph. Please let me know if any additional details are required. Thanks for your support.
Hello,I've just started working with TouchGFX and I would like to know if there is a possibility of showing an image (for example a .bmp) given the starting memory address where this asset is stored in the internal flash memory.The idea is to have a custom image stored in a specific location that the customer can edit from the bootloader when switching on the machine (let's say the new customized image will take the place iin the flash memory of the old standard one). Is it possible to do something like that? Can anybody give me some advice? The microcontroller is quite limited in both flash and RAM (STM32G0B0RET6)Thank you!M.
I made a test project for h7s7 using cubeIDE,the structure generated is below:Then I opened touchgfx designer and import a blank UI, when I tried to build the project, a error came out:Generate CodeGenerateWrote generated/gui_generated/include/gui_generated/screen1_screen/Screen1ViewBase.hppWrote generated/gui_generated/src/screen1_screen/Screen1ViewBase.cppDoneGenerate Assetsmake -f simulator/gcc/Makefile assets -j8Reading ./application.configReading ./target.configDonePost Generatetouchgfx update_project --project-file=simulator/msvs/Application.vcxprojDonePost Generate Targettouchgfx update_projectUnable to locate D:/STM32CubeIDE/workspace_1.7.0/7s7Test/.cprojectFailedFailed The .cproject is actually located in D:/STM32CubeIDE/workspace_1.7.0/7s7Test/Appli/.cprojectbut touchgfx designer goes to wrong folder.Anyone who can help?
Hello. I've been trying to implement FreeRTOS and TouchGFX into my STM32G071RB + GFX01M2 application (eventually I'd like to use G0B1RE for extra RAM). I've followed the link: https://support.touchgfx.com/docs/development/touchgfx-hal-development/scenarios/scenarios-configure-rtosbut am experiencing issues trying to get my code to work. The main issue I'm dealing with is the code fails to initialize execute MX_TouchGFX_Init(). After some digging around, I noticed that the code hangs in HAL_delay(100), line 284 of MB1642DisplayDriver.c. Further digging, I found that the external interrupt of the DISPLAY_TEARING_EFFECT_Pin is triggered, which results in the calling of some RTOS functions before the kernel has even started. I noticed that this only happens after Display_DCS_Send_With_Data(DCS_SET_TEAR_ON, arguments, 1) is called. I can make OSWrappers functions check if the kernel has been started, but this causes other problems and I am not sure if this is the correct appr
HelloI have a lot of assets, both images and texts, that I need to use across multiple projects. Is it possible to link to the assets without creating a local copy in the project?When I add an image in the designer it copies from the original location to the project assets\images folder. Can I not just set a relative link from the project folder to the folder that holds the assets? Thank you in advance.
Hello,MX_TouchGFX_PreOsInit() fails at the line below and connection to the debugger is lost in my project. Please see the screen below for the issue. The .ioc file is also attached. What's wrong with it? It is a custom board and working from RAM in FSBL. Is there any example project for TouchGFX with N6?
Problem: when i call the function "MX_TouchGFX_Process();" the screen becomes unstable. After using this function, the image becomes and remains stable. (1)What can be the issue?How can i update the screen during blanking period, when the LTDC is not fetching? AN4861 cites the following on page 37(see pictures below): To update the screen during blanking period, I'have tried the following code, but doesn't work, the RRIF flag doesn't set(RRIEN is enabled), sometimes it only sets one time, when calling the function for a second time, (2)does someone have a better code or correction of my code? I can't find example codes about this. My code: void vGenfuncScreenUpdate1( LTDC_HandleTypeDef *hltdc ) { HAL_LTDC_Reload(hltdc, LTDC_RELOAD_VERTICAL_BLANKING); // __HAL_LTDC_ENABLE_IT(hltdc, LTDC_IT_RR); while( __HAL_LTDC_GET_FLAG(hltdc, LTDC_FLAG_RR) == 0U ) { //wait here // printf(" waiting, %lu \r\n", __HAL_LTDC_GET_FLAG(hltdc, LTDC_FLAG_RR) ); } printf("
ST Community highlights – April to June 2026
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.