Discuss STM32 and TouchGFX implementations, including configuration, debugging, and optimization.
Most recent activity
Hello! I’ve been working on a project where I need to draw lines on the display using TouchGFX. I’ve managed to get a working solution with the help of TouchGFX's Graph code, but I wanted to share the code with you all to see if anyone has any suggestions for optimization.Here’s the current code I’m using: bool TestWidget::drawCanvasWidget(const touchgfx::Rect& invalidatedArea) const { if (numPoints < 2) { return true; // Not enough points to draw anything } touchgfx::Canvas canvas(getPainter(), getAbsoluteRect(), invalidatedArea, 255); for (int i = 0; i < numPoints - 1; ++i) { drawSegment(canvas, points[i], points[i + 1]); } return canvas.render(); } void TestWidget::drawSegment(touchgfx::Canvas& canvas, const Point& start, const Point& end) const { // Points for the current segment float x0 = static_cast<float>(start.x); float y0 = static_cast<float>(start.y); float x1 = static_cast<float>(end.x); float y1 = static_
Hi there,There is the following error in TouchGFX when I try to Generate Code, even for the previous projects that already generated code successfully. I uninstall and reinstall it and try other versions, but it failed again. the message of the error:Generate Assetsmake -f simulator/gcc/Makefile assets -j8The system cannot find the file specified.FailedFailed
Software Using:STM32CubeMX 6.11.1STM32 VS Code Extension v2.0.1STM32CubeCLT 1.15.1TouchGFX 4.23.2Visual Studio Code 1.89.11, 2, 5 always auto update itself.Hardware Using:MCU: STM32F411CEUBoard: A third party development board, "BlackPill" to be specific.Display: GC9A01 240x240 round display.Tips: Don't use SPACES in the path of any STM software and your projects, sometimes it will warn you but the other time it will create problems without your notice.Here is my progress:Generate a CMake project with X-CUBE-TOUCHGFX selected using STM32CubeMX, open the .part file with TouchGFX Designer and create a UI, before clicking Generate Code go to Config->Build->Post Generate Command and delete the command there, after deletion, click Generate Code, the code then can be successfully generated.But if you try to build, it will complain a lot about "No such file or directory", mainly some header files, go to ./cmake/stm32cubemx/CMakeLists.txt, add the following code
Hi, I'm trying to use only one dsi data lane with OTM8009A which has two data lanes.My MCU is STM32F769I-Eval and manuals said that this MCU has two dsi data lanes.However, I want to use only one data lane because my custom board has only one dsi data lane.I tried to change settings with Examples within F7Cube.In LCD_DSI_Videomode_SingleBuffer, DSI Settings value is in there, so I change NumberOfLanes value two to one, but LCD Display doesn't work.Is there any way to use only one data lane?Thanks.
Hi all,I'm trying to put some TouchGFX data (images, text, ...) in an external flash (S25FL128L) on a custom board with STM32H7B0VB mcu. I'm using the octo-spi peripheral as quad-spi.So, I follow the guide to make an external loader and I did it. It seems to work properly: if I load the .stdlr file in the STM32CubeProgrammer I can read, write, erase sector and mass erase the external flash.Also, if I try to debug (STM32CubeIDE) a project using the loader without putting elements into external flash all works and I can see all the memories.The ploblem occur whe I try to put somenthing inside the external flash. I do that in the linker script with TouchGFX sections: IntFlashSection and TextFlashSection. See the script below:/* Entry Point */ ENTRY(Reset_Handler) /* Highest address of the user mode stack */ _estack = 0x20020000; /* end of RAM */ /* Generate a link error if heap and stack don't fit into RAM */ _Min_Heap_Size = 0x200 ; /* required amount of heap */ _Min_Stack_Size =
Hello! I am struggling to get TouchGFX fully working on my custom PCB using a STM32u5A9ZJT (LQFP144). Everything compiles correctly and uploads. I can see my Screen1 background and button on my screen so at least that is working. But when I touch my button it does not transition to the next screen (as it does in the TouchGFX simulator when I run this code). Using my debugger i can see that the touch is triggering the external interrupt, and the coordinates are correct in STM32TouchController::sampleTouch but the expected screen transition never occurs. When comparing the IOC files between my working demo project and custom project, I noticed I did not have DCACHE enabled, but when I enable DCACHE I get a HardFault right after registering a touch. Setup background -- I began development with the Riverdi_50STM32u5a9. This was available as a board option on TouchGFX so I was able to create my project through TouchGFX first. However, the STM32u5 used in our custom PCB was not a board
What could be the cause of this glitch on my LCD-TFT screen? My system includes an F429 MCU, an SDRAM, and a 24-bit LCD panel. The interface was designed with TouchGFX, and the circuit board was designed by me.
Hi,By default, when you open a touchgfx project in the designer, images, texts and fonts come from the asset/ folder.How can I change that? I'd like to use another folder by default. I haven't found in the config files where this option is.Thanks in advance.
Hi everyone..I have issue here, I am using USB CDC VCP the applistate is not going into ready state, i tried alone with the usb host it is working correctly for this and also used example alsoTested configuration 1.Configured gpio pins for usb fs host VCP, FREE RTOS V1 or V2 added (tested seperatly) with the stack and heap size of 1024, I created the 2 tasks with priority normal for 1st task and below normal priority for 2nd task, for this no semaphore and queue is used it is working fine with out touch gfx task but with 2 tasks.2. When I configured project from touchgfx ide and even though I follow same configuration for usb host VCP the usb is going to application ready state after the enumeration done. For touchgfx itself adding default configuration of FMC, DSI, LTDC Etc.. and also tried changing the priority and stack and heap sizeIn 2nd method the appli state step directly going to application abort state then it will not work then come to working one with out touchgfx it is
Hi, I have a situation where the startup screen is chosen based on a the value of a variable. Is there any way to programmatically add a if else for the startup screen?
I was trying to build up a stm32g07 GUI project from scratch. But I encountered a distorted button displaying problem. It took me about 3 hours before I gave up, but when I accidentally changed the screen orientation, this problem was solved. I replicated the test, and I'm kind of sure it was a bug in DesignX, even if I changed the orientation back, it still worked. I tried to look for the difference in the generated code before and after I changed the screen orientation but saw nothing. I hope someone can explain to me how this problem arose and was resolved at the code level. Thanks.____________________Appendixes2-It works the same on the simulator and the hardware: 3-I uploaded the project with git so it's easy to track the changes (ignore the typo, 'distorted'='distored')
Hi Community!I worked with TouchGFX for last few years but this is my first attempt with partial faramebuffer strategy.The MCU is STM32G0B1CBT, TouchGFX 4.24.1 and The LCD is 240x320 with ili9341 driverI'm simulating the TE pin in systick to make the engine working. not sure if i'm doing it right if (frame_tick_ms > 0) { frame_tick_ms--; if (frame_tick_ms == 0) { v_sync = v_sync ? false : true; if (v_sync) { frame_tick_ms = 85; VSYNC_Rising_Callback(); } else { frame_tick_ms = 5; VSYNC_Falling_Callback(); } } } I tryed to follow the G071 example code. The LCD is up and working and i'm able to fill it with color before the GUI starts. But after that i'm facing this on my display and can't figure out where is the problem. It's looks like the framework doesn't sending the whole blocks and after a few lines it's stops till next transmition.Thanks in advance!
Hi community!I'm using Touchgfx 4.24.1 with a STM32H753ZIT6, integrated to a 1024x600 (RGB565) display. We use double frame buffer in an external SDRAM (parallel) with DMA2D enabled. This is a OEM custom board design for us, so the hardware is already validated.Application is running with FreeRTOS.My question to this thread is about the Modal Window.We design a pop up question in our application that have been a weird behaiviour.Always I call the popup.show() or popup.hide(), the entire screen is redraw. I believe it's true, specially if we apply a shade color with shade alpha higher than 0, am I correct?I do not use the popup.show() or popup.hide() frequently, it only are used after an button callback.The weird behavior using Modal is when it show or hide, affect another widgets in my view, specially the TextArea. Sometimes the a character disappear or just swap to '?'.About the '?', I double check the Typographies is everthing is OK, otherwise with/without the modal I always wil
Dear Gfx TeamIn addition to current implementation, could you please implement changing the parameter also1 using the keyboard arrow up/down keys and the mouse wheel in popup list.2 by hovering over the parameter and scrolling the mouse wheelThank you
I would like to take my existing stm32F746G-DISCO CubeIDE project, copy it and only change the chip from the STM32F746NGHx 218 BGA to the STM32F746IGTx 176 LQFPI can copy the project, but I don't see a way to change the chip. In the .IOC file under Pinouts you can search for pin compatible MCU's, but won't bring up 176 LQFP. Obviously not pin compatible.I have already re-worked the Altium schematics to use the 176 LQFP chip. My project eliminates several peripherals and changes some of the pins, but I figured can re-assign them in the new .IOC file?I am assuming I will need to create a new MXCUBE or TouchGFX project for the correct chip and then copy from working project to new project?Any insight appreciated!
Hi Everyone,I am new to this industry and right now i am actively looking for how i can persist the data in the display flash.I have three memory regions in my .ld file right now.
Hi,I have a scroll list that works perfekt in the simulator, but when running it on target (STM32H735) I need to set a periodic update of scollList.invalidate(), to get it to work. The problem is that only the first and last element show as selected, when scrolled to, but the function on each element is OK, i.e to switch language.What can be the cause of this? Here is the code:#include <gui/installation_lang_screen/Installation_LANGView.hpp> #include <images/BitmapDatabase.hpp> #include <texts/TextKeysAndLanguages.hpp> Installation_LANGView::Installation_LANGView() : currentIndex(0) , languages {{ { BITMAP_UNITED_STATES_ID, T_TEXT_ENGLISHUS, std::nullopt, std::nullopt }, { BITMAP_FRANCE_ID, T_TEXT_FRANCE, std::nullopt, std::nullopt }, { BITMAP_GERMANY_ID, T_TEXT_DEUTSCHE, std::nullopt, std::nullopt }, { BITMAP_HUNGARY_ID, T_TEXT_MAGYAR, std::nullopt, std::nullopt }, { BITMAP_ITALY_ID, T_TEXT_ITALIANO, std::nullopt, std::nullopt }, { BITMAP_NETHERLANDS_ID, T_T
Good morning,I'm working on a graphics project on a 7 inch Riverdi display (RVT70HSSNWC00-B). I added a screen containing a video but I couldn't play it so I deleted the screen and ran the Run Simulator but it gives me this error:=========================================================================================Run SimulatorGenerateDoneGenerate Assetsmake -f simulator/gcc/Makefile assets -j8Reading ./application.configReading ./target.configDonePost Generatetouchgfx update_project --project-file=simulator/msvs/Application.vcxprojDonePost Generate Targettouchgfx update_project.cproject file: ../../STM32CubeIDE/CM7/.cprojectWriting STM32CubeIDE project file: ../../STM32CubeIDE/CM7/.projectWriting STM32CubeIDE project file: ../../STM32CubeIDE/CM7/.cprojectDoneCompilemake -f simulator/gcc/Makefile -j8Reading ./application.configReading ./target.configCompiling gui/src/home_screen/HOMEPresenter.cppCompiling gui/src/home_screen/HOMEView.cppCompiling gui/src/setup_screen/SETUPPresenter.
I have been working on implementing TouchGFX in DSI Video Mode for a STM32H747-DISCO board. The LCD is a 5" 720x1280px panel, driven by a ILI9881C driver chip. After many issues with the DSI link, I have now successfully got something to display on the screen, but it is an absolute mess.This is my GUI And this is my display output (the diagonal red lines are on the screen protector)A bit more info...The driver IC is designed to be in portrait orientation, with 1280 lines at 720px width. This is how I have configured the DSI (720px video packet, 1280 VACT), LTDC (720 active width, 1280 active height & layer settings) and TouchGFX. I have set the desired orientation to landscape in TouchGFX.The screen is updating. I have a 10s splash screen that just displays a logo and then switches to the GUI. I can see the screen change after 10s, and some activity which will be coming from my live GUI. However, the activity only ever changes a whole line (really a column in terms of the actu
I'm trying to make TouchGFX and the touch screen from this kithttps://www.amazon.com/OpenH743I-C-Development-STM32H743IIT6-Microcontroller-XYGStudy/dp/B07VJ32MC3/?fbclid=IwAR1bRvOE7k_TxZOqdmRFrnxOmykbauhh-5T0qpy14sX4ygGIvmJZph-JOtYwork together. They have samples in Keil for STemWin, but I want to use TouchGFX in my research. (I'm a university professor working on something to support STEM education in underserved areas.)If anyone has TouchGFX working on this board, I'd really appreciate some help getting started. I'm reading through the porting guide, but I figure why reinvent the wheel.Thanks!
Short version:Code Generator changes the line "#define TICK_INT_PRIORITY 0U" to 15U in the stm32f4xx_hal_conf.h file and i want this to not occur.Heres's what I did in detail:I created a project from touchgfx, created a UI, uploaded it into my board and it worked well. After this I opened the generated .ioc file from the CubeIDE. I wanted the change the on-start state of the onboard LED to high from the .ioc to see if my modifications apply, so i generated the code with CubeIDE which compiled succesfully. After this I uploaded the software, and while the led was bright, the screen was plain white and it didn't show my UI. After a lot of headache I did some comparing between the files before and after the generation, and found that the value of TICK_INT_PRIORITY has been changed from 0U to 15U. I changed it back, uploaded the code, and now it works perfectly (both the screen works and the LED is on at startup). However, obviously, if i regenerate the code with CubeIDE, it will change th
Hi everyone,It's not unknown to people that TouchGFX designer is missing a key functionality: Grouping of views that have shared functionality, and separating the shared code into some interface. It's a feature that will appear in the Designer since it is currently not able to do this.So far people are adding the same custom container to different views to achieve "shared" functionality, but this only takes care of the UI definitions and not code that could also be shared, like handlers for buttons (which had to be written again in each view).A proper solution requires modifying the generated files, which will get overwritten again during the next code generation. Still, i've put together an example that you can look at to get a general overview. I'm attaching it here now, and will follow up with a detailed description of what's going on. I suppose we could consider this a pre-cursor to what will happen in the designer at some point and then you'll be READY and understand everything! =
Hi, I am currently working on a project to imitate a level display for an elevator. Using TouchGFX, i have 10 buttons with values 1-10 and once a button has been pressed it will add said value to a textbox with a wildcard on the screen. once that is filled the next button to be pressed will add a value to the following textbox. is there anyway of adding these TextAreaWithOneWildcard to an array or vector that ill allow me to cycle through each text area when printing each value to the screen. This is what i am thinking of doing for the printing section, where selections[] would be an array or vector that would hold the references to the text area such that as "i" increases, the program will print a desired value to correct text area. for (int i=0; i < 6; i++) { Unicode::snprintf(selections[i]Buffer, selections[i]_SIZE, "%s", floor[i]; selections[i].invalidate() }
Hi,I'm facing an issue displaying an image on a 1024x600 screen via RGB. As shown in the image, the frame buffer is displaying part of the image as an inverted image in the corners. I've double-checked the LCD timing parameters, and they all match the datasheet specifications.I'm using a custom board based on the STM32F429 with external SDRAM.Please find the attached images for the current configurations.Your suggestions will be highly appreciated.Thanks
MCU: STM32U575VGTFT with embedded RAM: 16bpp, 8-bit 8080 interfaceI'm following this scheme in which the bramebuffer is transfered via DMA2D, as decribed in AN4943:As a comment, there is a limitation when transfering a rectangle with an odd number of pixels in width and the byte swap feature is enabled (SB bit in DMA2D_OPFCCR register). A configuration error is raised:PL (Pixels per Line) bits, being two bytes per pixel in my case, are swappable so I didn't expect an error.Anyway, the question is: how are we supposed to synchronize the framebuffer access between steps 1 and 2 in the drawing?Following the documentation my guess is that calling OSWrappers::takeFrameBufferSemaphore() before sending and, as the DMA2D interrupt is handled by the touchgfx engine, the semaphore must be released in the transfer complete interrupt. Is this correct? It works but I'd like to know for sure.Thanks,Àlex
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.