Discuss STM32 and TouchGFX implementations, including configuration, debugging, and optimization.
Most recent activity
[If this would be better off in one of the other STM32 MCUs sub-forums, please feel free to move it admins]I have spent a very long time removing the BSP initialisation calls from the LCD_DSI_VideoMode_DoubleBuffering example on STM32F469I-DISCO, however it behaves exactly the same using the "stock" example and with my modifications. I am not using TouchGFX.The symptom is a consistent diagonal tear in a fixed location on my landscape configured display regardless of where the region of the screen I am editing is. Naturally, if the region I'm editing doesn't cross the diagonal, the tear isn't visible. Slow mo video of issue is attached.In both the example and my modified code, the screen is waiting on HAL_LTDC_LineEventCallback to switch to a new buffer like so:In my modified code as shown above, Buffers[front_buffer] is written to (using DMA2D) while the state machine is at the state before BufferPrepared, and then the state machine moves on to BufferPrepared 200ms later (same behaviou
Hello,DescriptionI have created a custom container to have the same stuff displayed at top of the screen, whatever the active screen is.In this custom container there's a text area tVersFw (with a wildcard and a wildcard buffer) which has to show a const string. I can't precompile the string in Designer beacuse the strings changes with firmware version (chosen at compile time by setting a preprocessor macro).So, in the initialize() call of the custom container I added this code: Unicode::strncpy(tVersFwBuffer, FW_VER_STRING, TVERSFW_SIZE); tVersFw.invalidate(); where FW_VER_STRING is like "ABC123". IssueWhen I change GUI language, at runtime, one of the two languages makes the textarea show weird things.It's systematic: when I select one language, "ABC123" is correctly displayed whikle when I choose the other I see something like "New TextABC123". What am I doing wrong? Thank you in advance,Andrea
I am currently working on a TouchGFX project with an H7 custom board with QSPI external flash and SDRAM.I am able to get the display working properly when not using the external flash.The external flash has been tested separately by writing to it & using the testbinary1M.bin file and the results are as expected.Images can be stored at the external flash address, and pixel data seems to be stored correctly too (Below is pixel data for a red PNG image...) // 4.22.0 0xd2f03614 D2 R1 FRGB888 U888 N0 SExtFlashSection // Generated by imageconverter. Please, do not edit! #include <touchgfx/hal/Config.hpp> LOCATION_PRAGMA("ExtFlashSection") KEEP extern const unsigned char image_redpng[] LOCATION_ATTRIBUTE("ExtFlashSection") = { // 480x800 RGB888 pixels. 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0
Hi all,I have create a custom container named "tableLine":And using the "tableLine", I make a "table":in "tableLine.cpp", I write the following code:void tableLine::setLineContent(tableItem_t* item) { Unicode::snprintf(txtIDBuffer, TXTID_SIZE, "%s", item->ID); Unicode::snprintf(txtTimeBuffer, TXTTIME_SIZE, "%04x%04x", item->date, item->time); txtID.invalidate(); txtTime.invalidate(); #ifdef SIMULATOR touchgfx_printf("setLineContent: %s %04x%04x\n", item->ID, item->date, item->time); #endif }And when I click the button "show data", the function "setLineContent()" will be called.Both of the simulator and the MCU is work well except the table content has NOT display.The simulator log as below:I already read and try the tutorial-04 successfully, I think the situation is the same, but why my program can NOT work as my expectation.Could you help me?Thanks a lot.
Hello everyone programmers, I am a beginner of stm32, and now I have a few questions for you:Question 1: I want to know how to use TouchGFX STM32cubeIDE and STM32cubeMX to make a simple GUI program? Tell me how these three pieces of software work together. For example, I first used touchgfx to select the corresponding development board to generate a blank UI interface, then automatically generated the code configuration.ios file through stm32cubeMX, then generated the code to open using stm32cubeIDE, and then made the GUI through touchgfx. For example, I first make the GUI in touchgfx, then configure a project in stm32cubeMX that corresponds to the model development board, and open the project in stm32cubeIDE. Then open the folder and copy the GUI code generated in touchgfx to the project that has been configured with stm32cubeMX. There may be other ways, but I don't know how these three software work together, if you do, please give me an analysis, thank you!Question 2: The developmen
Hello all, I have made a GUI with some circles that show as a LED. When the LED must be turned on the color of the circle shall be green and LED is OFF then the color must be changed to gray. So when I change the screen to another and back again, the color changes to a default value. As I understand I need to save the status to the Presenter and then to the model afterward I should get the status from the model and then the presenter. So now I want to know how to save the circle's color when leaving the screen. here is the screen shot for screenview:
I'm using TouchGfx 4.21.3 for designing LCD screens for my project with ST Microcontroller. I have a requirement to have 4000 of value to use for scroll list and each element in scroll list is container. Can I make scroll list with 4000 items in it (scrollList1.setNumberOfItems(4000);)? How much is the maximum value that scroll list can expand?
I am not very experienced with CPP or TouchGFX. I have created a Custom Container with a TextArea, a ToggleButton, and a couple of ScrollWheels. I have created a list layout, and used .add() to add two new instances of the Custom Container to my list at run time. The purpose is to create a list of alarms with a title, and some settable parameters for the User to set and save. I have figured out how to load the saved values into the ToggleButton and ScrollWheels from the values saved in the Model in setupScreen. listLayoutAlarmList.setWidthHeight(0,0); //Compensates for the list height that is set to 200 by the designer listLayoutAlarmList.setDirection(touchgfx::SOUTH); for(int i=0;i<2;i++) { CustomContainerAlarm *ac = new CustomContainerAlarm(); ac->setListElements(i, (int)!presenter->getAlarmEnable(i), presenter->getAlarmPriority(i), presenter->getLimitF(i), presenter->getAlarmRelay(i)); listLayoutAlarmList.add(*ac); } listLayoutAlarmList.invalidat
It received the initial code for the ILI9806E.The codes you received are as follows.write_command(0xFF); // Change to Page 1 CMD write_data(0xFF); write_data(0x98); write_data(0x06); write_data(0x04); write_data(0x01); write_command(0x08); //Output SDA write_data(0x10); write_command(0x20);//set DE/VSYNC mode write_data(0x00); I changed it as below to use it 469 for STM32.uint8_t p1PageChange[] = {0xFF, 0x98, 0x06, 0x04, 0x01}; /* page1 */HAL_DSI_LongWrite(&hdsi, LCM_ID_ILI9806E, DSI_DCS_LONG_PKT_WRITE, 5, 0xFF, p1PageChange);HAL_DSI_ShortWrite(&hdsi, LCM_ID_ILI9806E, DSI_DCS_SHORT_PKT_WRITE_P1, 0x08, 0x10); HAL_DSI_ShortWrite(&hdsi, LCM_ID_ILI9806E, DSI_DCS_SHORT_PKT_WRITE_P1, 0x20, 0x01);It's not working at all to make these changes and initialize them.I want to ask if the code I changed is wrong.
Hi i have this code: char string[6]="Hello";char string1[6]="World"; touchgfx::Unicode::UnicodeChar dst[6];touchgfx::Unicode::UnicodeChar dst1[6];touchgfx::Unicode::UnicodeChar txtAreaBuffer1[100]; Unicode::strncpy(dst, string, 6);Unicode::strncpy(dst1, string1, 6); Unicode::snprintf(txtAreaBuffer1, 100, "%s", dst, dst1); Unicode::strncpy(txtAreaBuffer, txtAreaBuffer1, 100);txtArea.invalidate(); Why i have output only Hello instead HelloWorld?
Hello everyone,I have been working with TouchGFX for some time now and have created a collection of functions that I need in each screen.At the moment I have to copy them manually into each newly generated screen and rename the function names.Is there a way to automate this by copying "my" functions into a template?After generation, these functions must then be adapted to this one screen.ExampleEach screen needs the "update" function, but each screen needs a different update because it has different objectsThe screen::update() function should therefore be generated automatically, but the content must be adapted manually.Different approach, same problem:"Can I customize the code generation templates in TouchGFX Designer to tailor the generated code to my specific requirements. This customization should allows me to adapt the generated code to fit my coding standards, project structure, or integration with other frameworks or libraries."I have found a directory "\template\" with sources,
My problems with Portrait orientation don't end.I have a very large project where changing the architecture and function calls costs much more than changing a single function.My problem is how?The function is readBMP24File.In my project it is loaded from several places and many different screens.In the original project it works very well, many images are called or even of different sizes from an MMC with fatfs.Has anyone solved the problem of changing orientation without having to change the position and orientation of the images?I'm starting to have serious doubts that the touchgfx gui really helps in the work I do.If anyone can help me in solving the problem with a new or different algorithm I would be grateful.
Good news for new-comers to TouchGFX!If you use MB1818 (X-NUCLEO-GFX02Z1) for your NUCLEO kit, you'll find it tiring to make quick and convenient button controls cuz there is no shortcut files for its navigation joystick. However, X-NUCLEO-GFX01M2 has a shortcut button control file from ST, and it's pretty convenient to use. TouchGFX on Low Cost Hardware | TouchGFX DocumentationThat's why I wrote this file.When you import this file into your project (details can be seen in the README file), you can immediately get your hands on interesting button interactions, as smooth as official files can do!So how to use it? Just follow the same steps in the documentation page above to call the buttons!Notice: This file was tested on NUCLEO-H563ZI + X-NUCLEO-GFX02Z1. For other compatible boards, you may have to modify the code...but not too much! Only minor adjustments!
I am developing an application that uses TouchGFX and having issues getting DSI clocks to the display.I am using a STM32F469i-DISCO and have replaced the supplied 800x480 screen with my own 800x800 MIPI DSI video mode display connected via an external adaptor board. All the interface signals required to drive the new display are present on the interface to the original LCD so all I have had to do is rearrange them for the new display.My problem is that I don't see any DSI clocks going to my display. I have checked the DSI data and clock lanes for hardware issues such as shorts etc, they are ok.I have created a simple 'Hello World' project using TouchGFX designer targeted at the original 480x800 display which runs fine using the STM32CubeIDE version.I have then adjusted the project built by TouchGFX designer using STM32CubeIDE and STM32CUBEMX to suit my display.To help with this process as a guide I have been following the TouchGFX. documentation https://support.touchgfx.com/d
Hello, I try to do my own keyboard.My idea: when click on shift button (red a, btnShift) i want replace big letters with small. All buttons are FlexButtonCan I use the Action Execute C++ code ?like this:btnA.setText(TypedText('a'));but not woking now :(
I'm running the LCD_DSI_VideoMode_DoubleBuffering example on the STM32F469 Discover board, and I get a diagonal tearing across the display when switching between the two images, even though they are using separate frame buffers.Attached is a video of the double buffering example except the delay between switching between the two images is smaller, it makes the tearing more obvious. Note the tearing still happens in the unmodified DoubleBuffering example. Looking at the example it should only be swapping the framebuffers during the vertical blanking of the display, so I would expect to see this tearing. I found another question which I believe is the same issue from a year ago, but it didn't get an answer.Any help would be appreciated
Hello,I have a problem with dynamic bitmaps when they are generated on an external SDRAM.We are using a STM32H743BGTx with TouchGFX 4.23.2 and STM32Cube Package 1.11.1.We create a bitmap cache in the external SDRAM:FrontendApplication::FrontendApplication(Model& m, FrontendHeap& heap): FrontendApplicationBase(m, heap) { uint16_t* const cacheStartAddr = (uint16_t*)0xD0000000; /* Bit per picture 320*240*3*8 */ const uint32_t cacheSize = 320*240*3 + 500;// Bitmap::removeCache(); Bitmap::setCache(cacheStartAddr, cacheSize, 1); }Then we create a new dynamic bitmap as follows:void Screen1View::setupScreen() { const int width = 320; const int height = 240; //Create the dynamic bitmap bmpId = Bitmap::dynamicBitmapCreate(width, height, Bitmap::RGB565); if (bmpId != BITMAP_INVALID) { bool isDynamic = Bitmap::isDynamicBitmap(bmpId); uint32_t nr = Bitmap::dynamicBitmapGetNumberOfBitmaps(); uint8_t *imgLocation = Bitmap::dynamicBitmapGetAddress(bmpId); //Debug Result = 0xf0000028
hi, I've installed the TouchGFX and I could compile it without any error. I did some images and buttons and only one screen inside TouchGFX Designer I could Generate code, and I could simulate it without any problem. But after compile the project, and upload the project in CubeIDE, I don't see any image in LCD.* First I've check the framebuffer, if it could be allocated properly. And I think it is.* I've checked the LTDC setup pLayerCfg.WindowX0 = 0;pLayerCfg.WindowX1 = 480;pLayerCfg.WindowY0 = 0;pLayerCfg.WindowY1 = 480;pLayerCfg.PixelFormat = LTDC_PIXEL_FORMAT_RGB565;pLayerCfg.Alpha = 255;pLayerCfg.Alpha0 = 255;pLayerCfg.BlendingFactor1 = LTDC_BLENDING_FACTOR1_CA;pLayerCfg.BlendingFactor2 = LTDC_BLENDING_FACTOR2_CA;pLayerCfg.FBStartAdress = 0x2400010c;pLayerCfg.ImageWidth = 480;pLayerCfg.ImageHeight = 480;pLayerCfg.Backcolor.Blue = 150;pLayerCfg.Backcolor.Green = 100;pLayerCfg.Backcolor.Red = 200; I made sure that I've the correct address of the framebuffer. * Th
I have designed a custom board based on a STM32WB35CE and want to use TouchGFX with it.I have enabled the TouchGFX Middleware in STM32CubeMX:and used the resulting ApplicationTemplate.touchgfx.part file to create a blank user interface with TouchGFX Designer and generated code.When building the code the linker throws the following error message:C:/ST/STM32CubeIDE_1.13.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.100.202403111256/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: cannot find -l:libtouchgfx-float-abi-hard.a: No such file or directoryThis "path" is added to the project's library paths when generating code with TouchGFX Designer. Does anyone know how to fix this issue?Versions:TouchGFX Designer 4.23.2STM32CubeIDE 1.15.1STM32CubeMX 6.11.1
Hello, I am a beginner in STM32 and Touchgfx. I am having a touchgfx application which has multiple screens. The main screen in touchgfx should update the live data received from Uart Rx. When a button in main screen is clicked, it should navigate to other screens. I am using an interrupt callback to receive the Uart data. The problem I am facing right now is, the Uart Rx is working fine through interrupt callback, and the data is being updated in mainscreen. But when the button is clicked, nothing happens. I suspect it's due to interrupt is being serviced often. Unfortunately my Uart DMA receive doesn't work and I am able to receive data only through interrupt callback. Can someone Hed some light on my issue? Thanks and Regards
Hello, I have a custom borad with a STM32F746BGTX and I use GFX Touch 4.20. I would like to have a bootloader and an application on the STM32F746BGTX. I have different images in gfx Touch for the bootloader and the application. The bootloader is stored in flash memory: 0x0800 0000 - 0x0803 FFFF The application is saved in flash memory: 0x0804 0000 - 0x080F FFFF I use an external Quad SPI Flash Memory (W25Q128FVSQ). I divided the RAM into 2 areas again. The bootloader gets 3MBytes (from 0x90000000 to 0x902EE000) The application gets 13MByte (from 0x902EE000 to 0x90FFFFFF). I want to jump from the bootloader into the application. The process: 1. Jump from Boorloader into the application. A value is written into RAM. 2. The function is called: NVIC_SystemReset() 3. In Main() I check whether a value is stored in RAM. If there is a value in the RAM, I jump into my application This process works perfectly and the application is also started. An error then occurs in HAL_Init(). In debug
Good morning, I'm quite new when it comes to TFT displays, I'm starting my adventure with STM32F746G-DISCO. I would like to design a similar HMI display (which does not need touch functionality) with the same dimensions of 4.3". From what I read, RK043FN48H-CT672B, i.e. the display in the discovery board uses the RGB protocol using LTDC. I would like to ask for help in selecting such a display and what should be paid attention to when writing the library and designing the PCB itself. I also wanted to ask if there are any displays in this size with an existing library
Delays in TouchGFX Designer such as for animation assume 60Hz tickrate. Example: //Fade homeIcon to alpha:0 with LinearIn easing in 1000 ms (60 Ticks) homeIcon.clearFadeAnimationEndedAction(); homeIcon.startFadeAnimation(0, 60, touchgfx::EasingEquations::linearEaseIn); For the simulator this is fine. But for the target this isn't always correct. I use LTDC as a tick source and this gets me about 40Hz.So animations run too slow on my target. I had to resort to calling custom C++ code instead of having TouchGFX generate it. But doing this every time is annoying. Is there a way to configure this? #ifdef SIMULATOR constexpr uint16_t ticks = 60 * 1.000; #else constexpr uint16_t ticks = 40* 1.000; #endif //Fade homeIcon to alpha:0 with LinearIn easing in 1000 ms homeIcon.clearFadeAnimationEndedAction(); homeIcon.startFadeAnimation(0, ticks , touchgfx::EasingEquations::linearEaseIn);
In some page, the "." is used as thousands separator, in other page the "." is used as decimal separator.For an english documentation that is dealing with software, I'm expecting that the "." is always a decimal separator.A space can be used for the thousands separator to avoid confusion.https://en.wikipedia.org/wiki/Decimal_separatorhttps://support.touchgfx.com/docs/basic-concepts/framebuffer"768.000 B"https://support.touchgfx.com/docs/development/hardware-selection/hardware-components/hardware-selection-mcu"1.536Mbytes/s.""307.200 bytes""DMIPS/MHz range 0.95-1.36"https://support.touchgfx.com/docs/development/hardware-selection/hardware-components/hardware-selection-external-memories"32.000 KB""4.718 Kbytes"https://support.touchgfx.com/docs/development/board-bring-up/how-to/02-cpu-running"128kb/0.012s = 10,666 kb/s"
I am trying to pass text into the wildcard of a text: ---// Container definitionDatenpunktFeldWert datenpunktFeldWertSchweissZeitSoll;---datenpunktFeldWertSchweissZeitSoll.setWertStr((touchgfx::Unicode::UnicodeChar*)L"23.4 s");--- /* * Wildcard Buffers */ static const uint16_t WERT_SIZE = 15;touchgfx::Unicode::UnicodeChar WertBuffer[WERT_SIZE];---void DatenpunktFeldWert::setWertStr(touchgfx::Unicode::UnicodeChar* wertStr){ touchgfx::Unicode::snprintf(WertBuffer, WERT_SIZE, "%s", wertStr); Wert.invalidate();}---In Simulator this works perfectly: However, only the 1st character is always shown on the display of the target. What am I doing wrong?
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.