Discuss STM32 and TouchGFX implementations, including configuration, debugging, and optimization.
Most recent activity
Thank you for helping.Environment: TouchGFX Ver 4.15.0What are the intflash.hex and target.hex files built and created by TouchGFX used for?Thank you.
Hello,I have recently decided to try upgrading a project I have originally generated using CubeMx 5.6 and designed using TouchGFX 4.13 to CubeMx 6.1 and TouchGFX 4.16. After some teething problems, I have managed to get it working and running on my custom STM32F7 board. The only problem is that there are about 2 images that when shown on the LCD screen come up with distorted colours. Any idea what might be causing this?RegardsSamer
Hello, I understand that the TouchGFX Engine needs OSWrappers::signalVSync() to be called when the LCD transfer is done. Before that, the Engine was halted to make sure that framebuffer doesn't get overwritten during the data transfer to LCD. You mentioned in the tutorial, that we can use TE-signal from the LCD when the transfer is done to invoke the function. However, some LCDs, like very popular and cheap ILI9341 do not have such a signal. In my application, I used a timer to periodically invoke OSWrappers::signalVSync(), every 5000 clock cycles (in its interrupt routine). Is there a better way to do that, and did you imagine it some other way?Best regards,
HelloFirst of all, thanks for developing such a powerful tool and delivering us such a content rich documentation.I am playing with the partial framebuffer strategy, and I notice that, when the code is generated by the CubeMX, in the files TouchGFXHAL.cpp is a comment that user should implement some functions."A user must implement C-methods touchgfxDisplayDriverTransmitActive() and touchgfxDisplayDriverTransmitBlock() used by the Partial Framebuffer Strategy."Later in the code, in the file TouchGFXGeneratedHAL.cpp, when these functions are supposed to be actually called, I see they re named without touchgfx part, just DisplayDriverTransmitBlock. Then in the tutorial on partial framebuffer scenarios, these functions have completely different names: LCDManager_IsTransmittingData and LCDManager_SendFrameBufferBlockWithPosition. So, having three names in tutorial, would bring quite confusion for someone who, like me, is trying to make the custom project work, imho.
uint8_t lcdRegData[2]; extern DSI_HandleTypeDef hdsi; void Wrt_Reg_3052(uint8_t Par1,uint8_t Par2) { lcdRegData[0]=Par2; HAL_DSI_LongWrite(&hdsi, 0, DSI_DCS_LONG_PKT_WRITE, 1, Par1, lcdRegData); } uint8_t NV3051D_Init(uint32_t ColorCoding, uint32_t orientation) { LCD_RESET_GPIO_Port->BSRR = LCD_RESET_Pin; HAL_Delay(1); HAL_GPIO_WritePin(LCD_RESET_GPIO_Port, LCD_RESET_Pin, GPIO_PIN_RESET); HAL_Delay(1); LCD_RESET_GPIO_Port->BSRR = LCD_RESET_Pin; HAL_Delay(150); HAL_DSI_Start(&(hdsi)); HAL_Delay(15); Wrt_Reg_3052(0xFF,0x30);exist way to check last command is sucess??? And ofcourse HAL_OK is returned always, i need other check.
Hello All,I am trying to create application template for STM32F429ZIT Discovery custom board. Can anyone guide me with the proper steps? I have also done with the manual copying of the SDRAM addresses from the working project to my project. But now I am looking for a standardized procedure. I have referred the link:https://support.touchgfx.com/docs/development/scenarios/scenarios-create-atBut it is useful only when creating TouchGFX project. Please guide me regarding CubeMX and CubeIDE steps.
Hey,I am using STM32f429VIT6 and TouchGFX graphics library on my custom board I am not using any OS.I have refered to the video shared in the youtube @ the below location:https://www.youtube.com/watch?v=EbWOv_0Lp-Uwhere I am able to get the steady display but the variable is not get updated for me. After debugging I have found that my function Screen1View::analogUpdate() was not called anywhere.SO wanted to ask, where should we call this Screen1View::analogUpdate() function in my code to variable to be updated.Thanks,Nirav Bhatt
Hello,From the documents, I can see that there's CN20 connector for RGB LCD. I'm wondering if I can use a RGB LCD.Thanks!
Hello! I have working system with LTDC + DMA2D run 800x600 at 32 MHz LTDC clock. In parallel there is configured SDMMC interrupt mode (no DMA) on 48 MHz and FatFs on it. And everything works fine. No glitches, no flickerings.Now I need to use 1024x768 resolution and to meet the display frequency I've increased LTDC clock to 48 MHz and got flickerings while DMA2D operations run in parallel with SDMMC reads.It is definately inside DMA2D operation because while I continuously draw a square with DMA2D and read SD card in other task -- screen flickers. But when I draw a square with pixels in the loops -- everything is OK and picture is absolute stable.Seems that there is a problem inside DMA2D/LTDC and SDMMC clock domains. I even connected SDMMC to PLL clock (not to PLLSAI) with the same bad results.How I could solve this issue or it is an internal MCU problem?
recently, I am working on a project with STM32F746 and 9" LCD with GT911 touch panel, everything is working fine except the colors in the LCD appears lighter than expected in TouchGFX design! maybe something wrong with the settings So I uploaded some pictures about LTDC and TouchGFX settings. Any help would be grateful.
We are working on the TouchGFX with STM32H7 controller , able to display the images but colors are getting inverted on the LCD. TouchGFX and LTDC configuration looks fine. So what may be the issue.For Black <--> White Blue <--> Yellow Red <--> Blue Green <--> MagentaThank You
https://www.youtube.com/watch?v=EbWOv_0Lp-U&t=1873sI saw this YouTube and tried to do the same.The textArea1Buffer variable declaration error occurred in Screen1View.cpp, and the screen was declared in Screen1View.hpp to complete the compilation.#include <gui/screen1_screen/Screen1View.hpp>#include "string.h"Screen1View::Screen1View(){}void Screen1View::setupScreen(){ Screen1ViewBase::setupScreen();}void Screen1View::tearDownScreen(){ Screen1ViewBase::tearDownScreen();}void Screen1View::analogUpdate(uint32_t value){ memset(&textArea1Buffer, 0, TEXTVIEW_BUFF_SIZE); Unicode::snprintfFloat(textArea1Buffer, sizeof(textArea1Buffer), "%.3f", value * 0.000805664 ); // // 3.3/4096 = 0.000805664// textArea1.invalidate();protected: static const uint16_t TEXTVIEW_BUFF_SIZE = 50; Unicode::UnicodeChar textArea1Buffer[TEXTVIEW_BUFF_SIZE];Compile was completed normally in CubeIDE compilation environment.However, since the ADC value is not updated, turning t
I use H750VBT6 FMC driver 800 * 480 LCD, due to internal SRAM is less than 800 * 480 * 2, so use PartialFrameBufferManager method.Because there is no TE pin in my LCD module.So I selected disabled when Cubemx generated the Partial Framebuffer VSync option for the project.Check the G071demo and find that the demo USES TE PIN of the LCD module, the edge is triggered and touchgfxSignalVSync() is called periodically.In this case, whether can continue to use PartialFrameBufferManager.If so, how do I call touchgfxSignalVSync() at the software level?Second question, under the condition of my present hardware, user-defined touchgfxDisplayDriverShouldTransferBlock () function, DMA or DMA2D speed delivery data should I use?If anyone has similar demo or *. Ioc, please provide it, thank you.These two issues, I think, are the biggest problems with TOUCHGFX on the H750, which currently has no external SDRAM.:face_with_tears_of_joy: :face_with_tears_of_joy: @Martin KJELDSEN
I am using STM32H747I-DISCO and trying to enable DMA2D so that TouchGFX framework uses it for rendering and displaying images on the LCD instead of using the CPU.TouchGFX Designer 4.15.0 does not generate project files for my board (It supports lots of boards and generate project files automatically except for 3 boards and mine is one of them). However, I designed my application and imported the generated files to STM32CubeIDE project and it is working.Things are going slow by using the CPU. I tried to use the STM32H7DMA class but could not know exactly what to configure in it. All what I done is having touchgfx_init function as follows: So, 1- What also should be done ? 2- How can I make sure 100% that DMA2D is being used not the CPU ? What can be a clear indication to know such a thing ?3- I read here that "DMA2D cannot be used to transfer data to H750VBT6" (Even if the board contains this module) and I do not know why and I am afraid that this applies also to my board. ho
Hello! I have a good 3d library https://github.com/FabioRM/dsp3D The author of the library ran it on STM32F746 . The library has the functionvoid dsp3D_LL_drawPoint(uint32_t x, uint32_t y, color32_t color) { if(x < minX) minX = x; if(x > maxX) maxX = x; if(y < minY) minY = y; if(y > maxY) maxY = y; // YOUR IMPLEMENTATION }we need to substitute the code of the output pixelI wrote to it my function TFT_FillRectangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint32_t color)oid TFT_FillRectangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint32_t color) { #define swap(a,b) {int16_t t=a;a=b;b=t;} if(x1>x2) swap(x1,x2); if(y1>y2) swap(y1,y2); uint32_t addr=0; addr = hltdc.LayerCfg[0].FBStartAdress + 3*(y1*hltdc.LayerCfg[0].ImageWidth+x1); hdma2d.Init.Mode = DMA2D_R2M; hdma2d.Init.OutputOffset = hltdc.LayerCfg[0].ImageWidth - (x2-x1); if(HAL_DMA2D_Init(&hdma2d) == HAL_OK) { if(HAL_DMA2D_Start(&hdma2
Hello,as many before I am wondering how to add custom headers to a project generated by TouchGFX. I have read a few forum posts like these:https://community.st.com/s/question/0D50X0000BJ22vx/how-to-manually-add-include-path-to-touchgfx-designerwindowshttps://community.st.com/s/question/0D53W00000TEpmmSAD/how-to-add-nontouchgfx-header-and-source-files-to-touchgfx-makefileI tried to include the header path in the makefile like this (I have no clue on how to code a makefile):is also tried:this is how it looks like in CubeIDE:I want to include the folder LEDs with my two needed headers. Could someone pls write some "Makefile examplecode" on how the include path hast to look like?Also for better understanding, why isn´t simply adding a new header to the project viable? It works for c files but not for headers an it also works for non TouchGFX projects. I simply copied the header code to my declarations before my main function and the functions defined in my c file worked as expected (e.g SK
I would like to highlight a single character within the text of a flex button. In my application I have an encoder with a button, which can change the numerical value displayed in certain increments, and I would like to switch the position of the highlighted character with each button click, thus indicating that different increments are used. Nice would be something like 123456 or 123456. I actually do not care much about the method for highlighting the character, so it can be a different color, bold face, underline, whatever, as long as it is highlighted. Is there a simple way for doing this? Are there any control sequences available for the text, for example "\u" to indicate that now the text should get underlined?
So I'm new to this development. I have STM32H7B3I-DK and need to connect to wifi/Internet and grab some data. I've experimented with TouchGFX Designer and there are templates that I like, especially the lens widget. Here are my questions:Is there a sample project that I can use?Would this entail the use of TouchGFX and some other software? Perhaps CubeIDE? Is there a good pdf or video on how to use TouchGFX with CubeIDE?Thank you!!**FYI; I'm running TouchGRX 4.15.0, CubeIDE 1.5.0, CubeProgrammer 2.5
Hello, I am using custom board with MCU 746 and generated my project with latest cubmx. When I added Touchgfx task in FreeRTOS, STM started getting reset like for 15-20 times, than everything starts working fine.Below is the stack information when it goes for hardfault. Also Model::tick() is getting called for once before reset. Any suggestions ? osThreadDef(defaultTask, StartDefaultTask, osPriorityNormal, 0, 7000); defaultTaskHandle = osThreadCreate(osThread(defaultTask), NULL); void StartDefaultTask(void const * argument) { /* USER CODE BEGIN 5 */ MX_TouchGFX_Process(); /* Infinite loop */ for(;;) { osDelay(1); } /* USE
Hi all,I would like to know how to use "handleTickEvent" on AnalogClock.I draw a screen with a Analog but thisone never upate itself.I see other examples witch use handleTickEvent to execute a new render but all has the same configurations..The strange thing is that In my code this routine is called for about 10 times only when touchscreen is pressed.this is my code:void Screen2View::handleTickEvent() { tickCounter++; if (tickCounter % 60 == 0) { if (++analogSeconds >= 60) { analogSeconds = 0; if (++analogMinutes >= 60) { analogMinutes = 0; if (++analogHours >= 24) { analogHours = 0; } } } // Update the clocks analogClock1.setTime24Hour(analogHours, analogMinutes, analogSeconds); } }class Screen2View : public Screen2ViewBase { public: Screen2View(); virtual ~Screen2View() {} virtual void setupScreen(); virtual void tearDownScreen(); virtual void handleTickEvent(); protected: int tickCounter; int analogHours; int analogMinutes; in
Hello, I am using STM32F746 with FMC SDRAM, QSPI flash, DMA2D. I observed my display is flicking. You can check video using below link.https://drive.google.com/file/d/1j3uyyHWHlFO-fGW23RI33Iyos6meYaB-/view?usp=sharingAny suggestions for solving this issue.I am using custom board with MCU 746 with below software with version :Touchgfx 4.15.0CubeMX 5.4.0IDE : System workbench for STM32Thanks
Hello, I am wondering why the HAL_DCMI_Start_DMA function supports only data transfer through DMA. I noticed that there is only one function for data transfer which is HAL_DCMI_Start_DMA. Another question, is there any example on the net that shows an implementation of this HAL function ? Thank you for your help, Othmane
I wanted to enter a code. Picture attached. I have a problem because there is not enough memory to handle it. What can you do?
Hello everyone. I am currently working with an STM32F469I-Discovery Board. I created my project using the STM32CubeIDE board selector and made my layout using TouchGFX. Both softwares communicate as it should and I can generate code from one software and see the changes in the other one. I successfully added a task to FreeRTOS so I know I can correctly program the board and that it is working. I also tested an example showing me that the screen is working as it should too.Now comes my problem. I am completely unable to display anything on the screen that has been created using TouchGFX and STM32CubeIDE. I configure the LTDC as well as the DSI in all imaginable configurations and nothing is working.I was expecting it to be rather straight forward, without barely touching anything:create the project in STM32CubeIDE (screen and communication configured by the IDE),modify the TouchGFX file to look as I want,generate the code,built and debug the code in STM32CubeIDE,the display shows up.Do
Hello, In my project I have 2 screen, Lets call it SCR-1 and SCR-2. First SCR-1 will be displayed for 1 sec and post SCR-2 will be displayed all time. Everything works fine till thn.In my project sometimes, I need to again put SCR-1 (with SCR-1 for 1 sec and thn SCR-2) during run time. When I try to do same, I am facing assert function. So screen is able to successfully change from SCR-2 to SCR-1 but post 1 sec while trying to go for SCR-2, touchgfx is going for assert.Below are the stack information. Here SCR-2 is main screen void FrontendApplicationBase::gotoMainScreenScreenNoTransitionImpl() { touchgfx::makeTransition<MainScreenView, MainScreenPresenter, touchgfx::NoTransition, Model >(&currentScreen, &currentPresenter, frontendHeap, &currentTransition, &model); }Its going for assert while at add(customizedArea), basically I added customizedArea as customized widget. QRCodeWidget customizedArea;void MainScreenView::setupScreen() { customizedArea.s
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.