Discuss STM32 and TouchGFX implementations, including configuration, debugging, and optimization.
Most recent activity
Hello!We are developing a custom project with touchGFX for display with DSI and without GRAM.Now we test it with f469-diso board. But we can`t customize touchGFX to DSI in video mode. We have read all topics about it, but still can`t find the solution.Our startup picture looks very strange: it seems, that several copies of one picture try to overwrite each other. But we can send pictures through the DSI in video mode and LTDC module without touchGFX. In this case, we think that the hardware settings are correct.We got all hardware settings from stm32 cube repository, project "LCD_DSI_VideoMode_SingleBuffer".In touchGFX settings, we choose Parallel RGB (LTDC) in display and LTDC in driver settings. Now our goal to send just one picture from the internal flash with touchGFX software.In the attachment, you can find the project. If you comment function osKernelStart() in main.c, you will see that display works fine!But with touchGFX it works really strange...Please, can anyone kindly
I created a basic project on the TouchGFX Designer and wrote a function in my own cpp file using touchgfx library. I want that when the button is clicked ,the function is called to ScreenView.cpp or ScreenViewBase.cpp from my own cpp file and change the color of the box.This is my cpp file.#include <touchgfx/Color.hpp> #include <touchgfx/widgets/Box.hpp> #include <gui/screen1_screen/Screen1View.hpp> #include <gui/screen1_screen/Screen1Presenter.hpp> ChangeColor::ChangeColor() { Screen1View::box1; box1.setColor(touchgfx::Color::getColorFrom24BitRGB(51, 168, 35)); box1.invalidate(); }This is the Screen1View.cpp where I want to call my function.#include<gui/ChangeColor.hpp> #include <touchgfx/Color.hpp> Screen1View::Screen1View(): buttonCallback(this, &Screen1View::buttonCallbackHandler) { } void Screen1View::setupScreen() { Screen1ViewBase::setupScreen(); button1.setAction(buttonCallback); } void Scre
void LCD_ReqTear(void) { static uint8_t ScanLineParams[2]; uint16_t scanline = 533; ScanLineParams[0] = scanline >> 8; ScanLineParams[1] = scanline & 0x00FF; HAL_DSI_LongWrite(&hdsi, 0, DSI_DCS_LONG_PKT_WRITE, 2, 0x44, ScanLineParams); // /* Write Tearing Effect Scan line command */ // set_tear_on HAL_DSI_ShortWrite(&hdsi, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x35, 0x00); // /* Tearing Effect Line On command : command with 1 parameter 'TELOM' */ }The above source is generated by the stm32f469i_discoveryTouchGFX proram.What I am curious about is the meaning of "scanline" and why it has 533 values. The stm32f469i_discovery lcd is 800 *480. Is it related to 480?If it is related to 480 I want to know how 533 comes out.LTDC->AWCR = ((WIDTH + 2) << 16) | 0x1E2; //LTDC->
Use the digital keyboard made by touchgfx, use an image control, a box control, and a TextArea control to create a high-end digital keyboard. The demo video has been placed on Bilibili, and there are tutorials on the CSDN blog!
I'm trying to access the View's members including the protected ones from outside. I don't want to that if I need to access the box, I need the address of the box. I want to access the View so I can access its every member. Is it possible?
Hello everyone,I am quite well set up on my project using an STM32F469I-Disco and TouchGFX. Everything is working very well. However, I would like to display data using a dynamic graph. If I choose a mode different from the Scroll mode, everything is updating very well. But when the dynamic graph is in scroll mode it is lagging quite a bit (~1fps) and the touch is almost not responding. How can I improve the performance in my project?Thank you everyone !
I have set up TouchGfx with CubeMx and TouchGfx Designer, then copied the necessary and generated files into an existing project based on ThreadX RTOS. The display driver is already tested and the initialization code is already transferred to the display (MX_TouchGFX_Init() finishes). But when calling the MX_TouchGFX_Process(), a hard fault appears:Because no source code is provided, I can’t figure out why it crashes:how can I figure out, what has happend?I’m wondering, if thre is any error handling within the TouchGfx Assembly code for such cases.
In the data sheet and reference manual of STM32L073, LCD_VLCD1 is 42pin and LCD_VLCD2 is 37pin, but in STM32CubeMX, the instructions are reversed.Also, at 1/3 bias, the reference manual is supposed to use LCD_VLCD1 and LCD_VLCD2, but STM32CubeMX will now use LCD_VLCD2 and LCD_VLCD3.Which is correct, the data sheet and reference manual or the STM32CubeMX 6.1.0?
Hi all,i would like to know if in STM32CubeIDE exist a mode to show the ASCII value of a "touchgfx::Unicode::UnicodeChar" in the value column.It can be very useful to developt the code.
Hello ,I am using STM32F429I-Discovery board I want to draw sprites on TFT-LCD with transparency on top of background image , I used black color as the transparent color for the images that I want to draw and used DMA2D at blending mode but the black color is not transparent and the sprite was drawn with a black color surrounding it. the sprite color mode is RGB565 (I have tried ARGB888 also with no hope) .The code :void DrawSprite(uint32_t img , uint32_t SprNo , uint32_t w , uint32_t h , int format) { /* Configure the DMA2D Mode, Color Mode and output offset */ Dma2dHandle.Instance = DMA2D; Dma2dHandle.Init.ColorMode = DMA2D_RGB565; Dma2dHandle.Init.OutputOffset = 240 - w ; /* Foreground Configuration */ Dma2dHandle.LayerCfg[1].AlphaMode = DMA2D_NO_MODIF_ALPHA; Dma2dHandle.LayerCfg[1].InputAlpha = 0xFF; Dma2dHandle.LayerCfg[1].InputColorMode = format; Dma2dHandle.LayerCfg[1].InputOffset = 0; if(SprNo == BACKGROUND) { Dma2dHandle.Init
..
Hello guys,I'm using touchGFX 4.16.0 and I would like to create an application template for my custom board. I'm following this tutorial.At the pack -d command, it generates an exception.Here's the message:user@DESKTOP-X ~ $ cd /c/TouchGFXProjects/DEMO2 user@DESKTOP-X /c/TouchGFXProjects/DEMO2 $ /c/TouchGFX/4.16.0/designer/tgfx.exe pack -d DEMO2.touchgfx Executing pack (Packs up the TouchGFX application): Exception non gérée : System.IO.IOException: Nom de répertoire non valide. à System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) à System.IO.FileSystemEnumerableIterator`1.CommonInit() à System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost) à System.IO.DirectoryInfo.InternalGetFiles(String searchPattern, SearchOption searchOption) à System.IO.DirectoryInfo.GetFiles(String searchPattern, Sear
Hello,INFO1- I currently have a problem with the STM32H7B3I-DK that I recently purchased. 2- I followed a tutorial from ST @ https://www.youtube.com/watch?v=mU5eZ_EXW8c . I'm using the same exact board.3- TouchGFX rev: 4.13.04- STM32CUBEMX rev: 5.6.05-STM32CUBEIDE rev: 1.3.05- I have attached the whole project file to this post as "DK.rar". This .ioc file was generated via STM32CUBEMX using the Boards Selector filter when creating a new project and searching for the board "STM32H7B3I-DK" . The only thing edited in the .ioc file was similar to what was edited in the youtube video above.ProblemThe Code compiles successfully on STM32CUBEIDE however as soon as I enter debug (which runs successfully too) I get a white screen only on the LCD display. Which is different than what I have in the generated TouchGFX .**It is important to mention that everything works fine if the application is generated by TouchGFX as a standalone program rather than being integrated with STM32CUBEMX. Could someo
Hello,I am trying to reconfigure my STM32H735G-DK to use HSI instead of HSE for a TouchGFX based application.The Default config (at a high level):HSE Source, main CPU at 550 MHz and peripheral bus at 275 MHz or 137.5 MHz; OSPI at 200 MHz and LTDC at 9.6 MHzThe HSE custom clocked (this worked):HSE Source, main CPU at 400 MHz and peripheral bus at 200 MHz or 100 MHz; OSPI at 192 MHz and LTDC at 10 MHzNext I replicated the same clock output as the HSE custom setup, but using HSI as input.This time the code build okay, but each time I flashed, all I got is a blank screen on the LCD.Is there any limitation where the clock has to be HSE to use with LCD/TouchGFX or am I missing something?Thank you for everyone's time
Thank you for your help.I'm a beginner.The following function is called by the line interrupt, but swapFrameBuffers () seems to be empty.Specifically, what kind of code should I write?What should I refer to and how should I switch between the two addresses?Is there any good example?Thank you.void HAL_LTDC_LineEventCallback (LTDC_HandleTypeDef * hltdc){ if (LTDC-> LIPCR == lcd_int_active_line) { // entering active area HAL_LTDC_ProgramLineEvent (hltdc, lcd_int_porch_line); HAL :: getInstance ()-> vSync (); OSWrappers :: signalVSync (); // Swap frame buffers immediately instead of waiting for the task to be scheduled in. // Note: task will also swap when it wakes up, but that operation is guarded and will not have // any effect if already swapped. HAL :: getInstance ()-> swapF
Hi,Recently, I started getting a wired glitch on the LCD periodically. I m using touchGFX 4.15 and CUbeIDE 1.5. After commenting some code relevant to the UI, Glitch doesn't comes. Any one have an idea what might cause this? Video is attachedhttps://www.youtube.com/watch?v=ghRrd-VNGKcThanks a lot.
I'm trying to use the Graph Widget in a Swipe Container, so that when I to another screen, I have another plot running. On touching the container this causes a hard fault, from which I can't find out what is causing it.The Fault Analyzer in the IDE shows a Precise data access violation with BFAR: 0x4404ea68, so it seems like there is a memory overflow, but I can't pinpoint the place it happens. Is there any way I can narrow it down?
A singular slider works fine in the page. I've tried many callback/handler methods (individual for each slider, combined with cases), but can't seem to be able to fix the issue. See my attached pageSetupView.cpp and pageSetupView.hpp functions pertaining to the sliders.void ZoneSetupView::setupScreen() { //Zone 1 Slider Definition zone1Temp.setXY(120, 60); zone1Temp.setBitmaps(touchgfx::Bitmap(BITMAP_SLIDER_BACKGROUND_ID), touchgfx::Bitmap(BITMAP_SLIDER_BACKGROUND_FILLED_ID), touchgfx::Bitmap(BITMAP_SLIDER_KNOB_CIRCLE_ID)); zone1Temp.setupHorizontalSlider(14, 14, 0, 0, 200); zone1Temp.setValueRange(50, 250); zone1Temp.setValue(100); zone1Temp.setVisible(false); add(zone1Temp); zone1Temp.setStartValueCallback(zonetempsliderValueStartedChangeCallback); zone1Temp.setNewValueCallback(zonetempsliderValueChangedCallback); zone1Temp.setStopValueCallback(zonetempsliderValueConfirmedCallback); textZone1Temp.setPosition(360, 65, 115, 46); textZone1Temp.setColor(Color::
Hi, I would like to make some tests with the DSI Video Mode on the Stm32F769 MCU. Is the Disco board and display capable to support video mode and how can it be configured in CubeMX? If not possible with this display, is there another display compatible with the demo board to make some tests?Thanks Lukas
If you have an example, please help.
I generated a Keil based TouchGFX project in stme2cubemx.The DynamicBitmapCreat function was called to create the first Bitmap without any problems, the ID and startAddress were all correct, but when I created the second Bitmap the program went straight into HardFault.I'm using TouchGFx16.0, and have used TouchGFx13.0 before, but have not resolved this issue.Any good suggestions?
The project bitdepth is set in the designer as 16 bit.I need to use a dynamic bitmap to visualise data and, as per a recent suggestion on this forum, I am creating an ARGB8888 format bitmap, however the program freezes, displaying a black area on the screen from the location of the dynamic bitmap downwards.Note that previously I was using an RGB565 dynamic bitmap and everything was working well, but since I need to do alpha blending I am now attempting to use an ARGB8888 bitmap.I don't think memory is the issue as even creating a very small sized dynamic bitmap still results in the freeze. Besides which, when I trace the bitmap id and bitmap address, they both look fine (ie not BITMAP_INVALID or nullptr for the address)Is there something else I need to do to use an ARGB8888 bitmap within a 16bit colour depth project?
Hi,I use STM32CubeIDE and TouchGFX.Sending to "stm32f746 discovery board" using com port text.When I send different letters, everything is OK.If I send several identical letters, the result is with the character ?example:asdfghjkl -> asdfghjklaaaaaaa -> aa? a? a?Does anyone know where the problem is?Part of the code: if(uartMsgData[0] != 13) { uartMsgBuf[msgIndex++] = uartMsgData[0]; } else { msgIndex = 0; msgRdyflag = 1; }
I have used STM32L151xE in a board and drove a glass LCD with it and it works without any problem. But in its datasheet, in two sections, it is mentioned that, STM32L151xE is not support LCD and just STM32L152xE can support it. Is there any explanation for this?I am sure that the IC is original.
Hello Touch GFX Guys.Hardware: STM32H7B3I development boardSoftware: Touch GFX designer 4.16STM Cube IDE 1.5.0We are trying to experiment with "dynamic graph" widget and experiencing some problems .After adding widget on the screen follow code is generated dataGraph1.setScale(1); dataGraph1.setPosition(10, 10, 380, 180); dataGraph1.setGraphAreaMargin(0, 0, 0, 0); dataGraph1.setGraphAreaPadding(0, 0, 0, 0); dataGraph1.setGraphRangeY(0, 100); dataGraph1Line1.setScale(1); dataGraph1Line1Painter.setColor(touchgfx::Color::getColorFrom24BitRGB(20, 151, 197)); dataGraph1Line1.setPainter(dataGraph1Line1Painter); dataGraph1Line1.setLineWidth(2); dataGraph1.addGraphElement(dataGraph1Line1); dataGraph1.addDataPoint(6.40222585735995f); ........ dataGraph1.addDataPoint(15.6299816028386f); dataGraph1.addDataPoint(9.83211034085783f); dataGraph1.addDataPoint(10.0465691581937f);Once we run the application code is crushing. if we comment dataGraph1.addGraphElement(dataGraph1L
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.