Discuss STM32 and TouchGFX implementations, including configuration, debugging, and optimization.
Most recent activity
Hello,when i need to include cpp headers in main.c to use classes and cpp functions, I usually convert project to c++, rename main.c to main.cpp and everything works good.Now I started project with TouchGFX. The only way to compile project without any errors is using main.c (not main.cpp). Else there are some errors, maybe connected with architecture of TouchGFX (i found main.cpp file ProjectName\TouchGFX\simulator\main.cpp).
I want to use touchGFX on STM32L496G-Disco with a screen connected to spi1 and not the on board screen.the screen connected to spi1 is supported on another board with the driver in ST7789.c + .h when it is connected to STM32L476RG_NUCLEO. the problem I have with this board is that touchGFX can't run on it because of small ram size.I tried to switch to this driver, but I had problems to change the TouchGFXHAL.cpp . I don't know what should I do with this layer.thanks.eyal.
I am trying to "press" a button without actually touching the touchscreen of my development board.Reading the TouchGFX documentation, I found that there is a method calledClickEvent, that seems like it might do the trick.I tried calling the following:// ClickEvent(ClickEventType type, int16_t x, int16_t y, int16_t force =0) ClickEvent(ClickEvent::PRESSED,396,420);The X and Y coordinates were obtained from TouchGFX Designer, as you can see in the following image.Even though it compiles, I can't seem to get this to work. I am not sure if I am using this the correct way, or maybe there is another way generating a click. PD: I am using TouchGFX version 4.13Thanks
Hi, I use 'makeTransition' function to animate the screen transition and the new screen has a large number of dynamic data display. I want to display these after transition finished, but how can get the status of screen transition (I checked file 'MVPApplication.hpp', but I didn't get the status I wanted). Can you give me some advice, dynamic data display during the transition will cause the transition to be unsmooth. TouchGFX: V4.18.0 CubeMX: V6.3.0 Mcu: Stm32L4
Hey guys,So, I'm taking on a project that will use STM32H7 chip with a TFT panel screen (with touch capabilities) on a custom PCB. The project is a custom gauge (like a speedometer) that allow user inputs via the touch display. So my question is, does anyone know where I can learn more about programming the UI using the touchGFX (after setting up the base UI using the application).My main interestLearning more about the refresh/tick function that updates the gui (the documents wasn't very clear), like how to call/modify it to call custom functions.How to add (and effective way to doing it) tap, tap n hold, and drag function to (any) element on the screen or just any section of the screen.How to add event handlers to elements (e.g when something before unfocused)Thanks,
environment:keillink file code: LR_SDRAM 0xC1A00000 0x00600000 { ; load region size_region ER_SDRAM 0xC1A00000 0x00600000 { ; load address = execution address *.o (TextFlashSection) *.o (FontFlashSection) *.o (ExtFlashSection) }}blockcopy:if (dataOffset >= 0xC1A00000 && dataOffset < 0xC2000000) { dataOffset = dataOffset - 0xC0000000; BSP_SDRAM_ReadData8(dataOffset, (uint8_t *)dest, numBytes); return true; }Hi, ST engineer. When my mcu is power up, copy the touchgfx source from qspiflash to sdram, and touchgfx task link source in sdram. I had changed the code as details above.Compare data in sdram and qspiflash of touchgfx source is same , but jump to hardfault when it power up.How can I link my source in extern sdram? Is that any demo code?hardfault detail:
Hi,I need to load dynamic png images at run-time. I've read TouchGFX documentation for Loading Images at Runtime. However, the examples cover BMP and JPG formats. Is there a PNG loader?Thanks,Ari
Hi everyone!I'm trying to integrate my own touch controller with TouchGFX on a custom board. My touch driver gives me XY coordinates of an event (press or release). Basically with this information I can do whaterver I want. So, for example, I can change color of a box when that box is pressed simulating a button.But if I want to use the button widget with an interaction, TouchGFX generates a buttonCallbackHandler that execute code. How can I tell TouchGFX that, if my touch driver tell me that a XY coordinate relative to the button is pressed, it should call the buttonCallbackHandler?Hopefully I wrote it clear. If it's not feel free to ask.Thank you.Niko
Hi All,I have a problem with bitmap caching. Below is the contextProcessor and Peripheral’s details:-STM32F429ZITX micro8 Mega bytes external SD RAM16 Megabytes SPI flash(not quad)Our use case:- We have GUI application with several screens(setup , functionality, presets …etc). The total assets size is of 11 Mega bytes which are stored in the SPI Flash. As our SD Ram is only 8 Mega bytes size we just want to dynamically copy the assets from SPI Flash screen by screen on demand to SD ram and try to display them.In order to achieve the above I followed below two linkshttps://support.touchgfx.com/docs/development/ui-development/scenarios/using-non-memory-mapped-flash/https://support.touchgfx.com/docs/development/ui-development/touchgfx-engine-features/caching-bitmaps/Steps I followed:-In the linker script I used below snippet and segregated all the assetsSRAM (xrw) : ORIGIN = 0xd0061c8c, LENGTH = 7450KExtFlashSection :{*(
Hello!In attach - project for CubeMX.If I generate project for Keil and try to compile, I get errorsH743\H743.axf: Error: L6200E: Symbol SystemInit multiply defined (by system_stm32h7xx_1.o and system_stm32h7xx.o).H743\H743.axf: Error: L6200E: Symbol SystemCoreClock multiply defined (by system_stm32h7xx_1.o and system_stm32h7xx.o).H743\H743.axf: Error: L6200E: Symbol D1CorePrescTable multiply defined (by system_stm32h7xx_1.o and system_stm32h7xx.o).H743\H743.axf: Error: L6200E: Symbol SystemD2Clock multiply defined (by system_stm32h7xx_1.o and system_stm32h7xx.o).H743\H743.axf: Error: L6200E: Symbol __asm___18_system_stm32h7xx_c_5d646a67____REV16 multiply defined (by system_stm32h7xx_1.o and system_stm32h7xx.o).H743\H743.axf: Error: L6200E: Symbol __asm___18_system_stm32h7xx_c_5d646a67____REVSH multiply defined (by system_stm32h7xx_1.o and system_stm32h7xx.o).H743\H743.axf: Error: L6200E: Symbol __asm___18_system_stm32h7xx_c_5d646a67____RRX multiply defined (by system_stm32h7xx_1.o and
I created two screens and did the actions to change the screen. But changing the screen does not work correctly.Added an extra buffer for animationuint16_t buf_ram [160*128];using namespace touchgfx;namespace { LOCATION_PRAGMA("TouchGFX_Framebuffer") uint32_t frameBuf[(160 * 128 * 2 + 3) / 4 * 2] LOCATION_ATTRIBUTE("TouchGFX_Framebuffer");}void TouchGFXGeneratedHAL::initialize(){ HAL::initialize(); registerEventListener(*(Application::getInstance())); setFrameBufferStartAddresses((void*)frameBuf, (void*)(frameBuf + sizeof(frameBuf)/(sizeof(uint32_t)*2)), (void*)buf_ram);}
Hi, I have successfully implemented a complete graphic to display some system related parameter on a monochrome OLED Display with display driver SSD1322, which is a horizontal drawing pixel, however porting the same code to a monochrome OLED Display with display driver SSD1309 result in a gibberish (see the pics), it supposed to look like pics 1 & 2.Is there any changes or function build in TOUCHGFX to transform the horizontal byte orientation to vertical byte orientation ?ref:Vertical byte orientation e.g. (of a square block):uint8_t Vdata[16] = {0xF0, 0x10, 0x10, 0x90, 0x90, 0x10, 0x10, 0xF0, 0x0F, 0x08, 0x08, 0x09, 0x09, 0x08, 0x08, 0x0F};Horizontal byte orientation e.g. (of a square block):uint8_t Hdata[16] = {0x00, 0x00, 0x00, 0x00, 0xFF, 0x81, 0x81, 0x99, 0x99, 0x81, 0x81, 0xFF, 0x00, 0x00, 0x00, 0x00};I'll appreciate for nay help.thanksJitu
i have two questions how can i lower the CPU frequancy so the power consumption will be lower - where can i configure this?and the second is how can i place the CPU in sleep mode and still show a screen saver on my display - thus reducing the power consumption in sleep mode?how low can i go in this situation in the power consumption?thanks in advance
My DCMI setting is as follow:hdcmi.Instance = DCMI; hdcmi.Init.SynchroMode = DCMI_SYNCHRO_HARDWARE; hdcmi.Init.PCKPolarity = DCMI_PCKPOLARITY_RISING; hdcmi.Init.VSPolarity = DCMI_VSPOLARITY_HIGH; hdcmi.Init.HSPolarity = DCMI_HSPOLARITY_LOW; hdcmi.Init.CaptureRate = DCMI_CR_ALL_FRAME; hdcmi.Init.ExtendedDataMode = DCMI_EXTEND_DATA_8B; hdcmi.Init.JPEGMode = DCMI_JPEG_ENABLE;The ov5640 HREF is active low and VSYNC is active high and it runs in JPEG mode 3, the waveform of VSYNC (yellow) and HSYNC (green) is shown below:When debugging with keil, I always have a DCMI_FLAG_ERRRI error. The manual says it is happens when using embedded synchronization, which I am not using. I can recieve the start of a jpeg image, 0xFF 0xD8 , in my ram, but it is followed by another 0xFF.I can not figure it out by myself, I truly need your help.
Hello everyone!I'm working on a TouchGFX project on STM32F429 discovery board, because of the small size of the internal flash I have used SD card module with SPI communication standard to store the images.Steps I follow these videos https://www.youtube.com/watch?v=-0kFwp0ao6kThe steps I did are different from the video:+ The address allocated for the SD card in file.ld is 0x90000000+ The communication standard I have installed in the STM32Cube MX is SPI1 not SDIO+ QSPI and SDMMC function is not supported on stm32f429 discovery boardThe other steps are exactly the same as the video sequence.The results that appear on my LCD monitor are colors that are skewed, images cannot be displayed. I tested the Bitmap::CacheAll() statement and it returns true.Someone please give me some adviceThank you everyone!
After opening 4.18.0. It stops working after being idle for a period of time, or after creating a new project, or after clicking on some blank areas, and there is no response. How to solve this? (the networked computer is normal, and the non networked computer often does not respond
I'm developing a schematic with the STM32L4R9ZIJ6 package (UFBGA144) for an embedded system that will use the DSI HOST API. However, this package doesn't seem to include the the VDD12DSI pin. What's this pin even for? and why is it on other packages like the LQFPs but not this one?
My project is based on touchgfx using DSI video mode with double buffer. When set the background, part triangle area cannot be refresh. The DSI video configured as the example project of "LCD_DSI_VideoMode_DoubleBuffering".
..
Hi, Add a button on the swipeContainer, the swipeContainer cannot slide when the starting point of the gesture is on this button.
Hi, I add a modalWindow is overlaid with a swipeContainer, the drag still can trigger the swipeContainer in the background when modalWindow was visibled. How can I disable to trigger the containers in the background?
Hello.I'm trying to enable LWIP (TCP/IP) in my TouchGFX project on H750B-DK board. I am able to successfully enable LWIP and ping my device without TouchGFX (on an empty project), but when I follow exactly the same steps, but on a TouchGFX project, the LWIP fails to initialize.I'm using the newest 3.0.6 version of H750B-DK template from TouchGFX. I edit it to my preferences and generate the code. Then I open the project from STM32CubeIDE folder in Cube and proceed to enable the LWIP in MX. I follow almost the same process as on an empty project. The only difference is that I have to delete PA2 pin that's assigned to LCD_RESET in order to enable Ethernet, and also I have to use MPU region 5, 6 and 7 instead o 0, 1 and 2, beacuse they are already defined by TouchGFX. I generate the code, then open TouchGFX project to regenerate the code. After that I proceed to add /* Modification start */ .lwip_sec (NOLOAD) : { . = ABSOLUTE(0x30040000); *(.RxDecripSection
TouchCalibration tsCalibration; // TouchGFX 4.17MATRIX matrix ; // Carlos E. Vidalestouchgfx::Point lcdCalibPoints[3] = { { 0, 0}, { 0, 240 - 1}, {320 - 1, 240 - 1}};touchgfx::Point tsCalibPoints[3] = { { 0, 0}, { 0, 240 - 1}, {320 - 1, 240 - 1}};void STM32TouchController::init() { tsCalibration.setCalibrationMatrix(lcdCalibPoints, tsCalibPoints); setCalibrationMatrix((POINT *)lcdCalibPoints, (POINT *)tsCalibPoints, &matrix );}bool STM32TouchController::sampleTouch(int32_t& x, int32_t& y) { POINT display, screen ; touchgfx::Point tsPos; x = tsCalibPoints[0].x; y = tsCalibPoints[0].y; tsPos.x = x; tsPos.y = y; screen.x = x; screen.y = y; tsCalibration.translatePoint(tsPos);
I m using NUCLEO_L4Z5ZI and When i debug or run the code to microcontroller and compiler start to run HAL_DELAY line, HAL_DELAY is staying infinity loop and rest of code can not run or Sometime, MCU is meeting after I pressed to Debug or Run button. But when i plug out to USB cable from NUCLEO_L4Z5ZI and plug in to it again, HAL_DELAY function works well.I try to debug or run the code to it again, I m getting the same problem again until i plug out.(If i make some grammer mistakes, i am apologize to you.Explaining problem with video : https://youtu.be/sJRU0cPavT0myProject Github : https://github.com/mmtcoder/Nucleo-L4R5ZI-Debugging-or-Running-Fault
Hi,I have a new project which uses the TIMER8 in Encoder mode. The app works pretty nice, but I need to display the encoder pulses/frequency of the input signals on the LCD. I am using STM32H747I-DISCO board. I do not want to use any OS. So, my simple question is:How I can add the STemWin library into my project?I tried to copy settings of the STemWin_HelloWorld project in my project but it seems to me “Mission impossible�?. I have tons of errors. I could not find any document which would explain how can do this job. The tech support is in “silence mode�?. The Stem554-pdf did not help much. Thanks,Louis
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.