Discuss STM32 and TouchGFX implementations, including configuration, debugging, and optimization.
Most recent activity
I redesign a layout of a keyboad (as I'm interested in numeric keys only, for a login).Everything is OK but I didn't managed to place the text of the key inside its button shape ( i.e. texts: "1", "2", etc appears outside the button)How can I tell where to draw the texts of keys?Thanks
Iam generating code through TouchGfx tool. And I have compressed my images into LZ format now Iam able to decompressing at run time also. but i have multiple images. i need to pass all images BMP array through single frame buffer. so how to pass multiple arrays in to single decompression logic.
Multiple selection of rows are intended or it is a side effect?Why if i set the same functionality on the pin view of one pin it disables the LTDCGPIO Settings, the pin configuration area should be vertically resizable
Datasheet specify a minimun serail clock for writing of 100ns. For sure I'm missing something because you have examples availables. Can you help in regards ?
Hello everybodyDoes anyone set up USB camera?
I have been trying to add graphics to an stm32f407 demo board via SPI. I have not been able to get a project started where GRAPHICS appears in the middleware options. I have downloaded the F4 firmware packages, STemWin and TouchGFX but none of these packages give any indication how to install them and in the case of F4 firmware specifically says that it does not contain GRAPHICS middleware.Can someone point me in the right direction to be able to do this please.Thank you
Dear TouchGFX Team,first of all, thank you for providing a great tool for top notch graphics. I'm happy to play with it, and learning about gfx basics from your resources was definitely most valuable input for me. Since I don't have any demo boards at my disposal, I decided to play with some items I already have: an STM32F411RE based Nucleo and SPI ILI9341 based LCD. The problem number one in this project is a RAM size: a full 320x240 ILI9341 compatible framebuffer requires cca 150 kB, while STM32F411RE has 128kB. But for the sake of learning, I decided to go with it, and split the screen area in half. That means, I configure my LCD to 160x240 resolution, which in RGB565 requires only 75 kB framebuffer. My ili9341 library didn't have any problems with it and all the test functions worked, displaying images at half the screen only. So far so good.But then, when I decided to integrate TouchGFX into my basic projects, it started behaving funny. Here's what I did: Created new project in ST
Hello! I am trying to add a button to my application manually through code. I thought it would be quite simple, but for some reason I am having some difficulties.I have added it my screenView class, and initialised it using bitmapped images from the TouchGFX library.It displays on screen correctly, but does not respond to any touches. I would expect at this point for the image on screen to change when I press it.I have added other buttons from the designer, that are responding correctly. Does anyone have any idea what I am doing wrong? Is there something I am not initialising correctly that links the button to TouchGFX engine?I'm embarrassed to say that this has stumped me for several hours now! Thank you.screenView.hpp:#ifndef SCREENVIEW_HPP #define SCREENVIEW_HPP #include <gui_generated/screen_screen/screenViewBase.hpp> #include <gui/screen_screen/screenPresenter.hpp> #include <touchgfx/widgets/Button.hpp> class screenView : public screenViewBase { pub
I'm a bit confused about the strategy used to determine when to swap buffers when TouchGFX is configured for double frame buffers. As illustrated here, the intent of the double frame buffer is to allow the old frame buffer to be presented if there is a long render time for the next frame. The issue is that I don't see how the TouchGFX implementation enables this. My understanding is that the function HAL::swapFrameBuffers is responsible for switching the pointer to the current frame buffer for the LTDC. Looking at calls to this function, the only one I can find is within the HAL_LTDC_LineEventCallback within TouchGFXGeneratedHAL.cpp.extern "C" { 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:
I'm experiencing a runtime crash when using DCMI in with `USE_HAL_DCMI_REGISTER_CALLBACKS`.The crashing lines are#if (USE_HAL_DCMI_REGISTER_CALLBACKS == 1) /*Call registered DCMI line event callback*/ hdcmi->LineEventCallback(hdcmi); #else HAL_DCMI_LineEventCallback(hdcmi); #endif /* USE_HAL_DCMI_REGISTER_CALLBACKS */This seems to be caused by by conflicting definitions of `HAL_DCMI_Init`.One definition is in `stm32f4xx_hal_dcmi.c`:__weak HAL_StatusTypeDef HAL_DCMI_Init(DCMI_HandleTypeDef *hdcmi) { //... /* Init the DCMI Callback settings */ #if (USE_HAL_DCMI_REGISTER_CALLBACKS == 1) hdcmi->FrameEventCallback = HAL_DCMI_FrameEventCallback; /* Legacy weak FrameEventCallback */ hdcmi->VsyncEventCallback = HAL_DCMI_VsyncEventCallback; /* Legacy weak VsyncEventCallback */ hdcmi->LineEventCallback = HAL_DCMI_LineEventCallback; /* Legacy weak LineEventCallback */ hdcmi->ErrorCallback = HAL_DCMI_ErrorCallback; /* Legacy weak ErrorCallback */ if(hdcmi->MspInit
Hello,I managed to connect several displays on a custom PCB (similar to 32F429IDISCOVERY) using several drivers (ILI9344,ILI9488 etc) and running the TouchGFX library.Now, I have a problem with a new one. It supports RGB directly but has no DE (data enable) signal. Should I let the PB10 (= LCD_DE) pin from MCU floating? It confuses me that display has no DE pin (on some displays also called EN).P.S I am attaching the datasheet
I'm trying to write a class that contain a clickable Box. The action of the click event is handled in the Screen1View.I'm total loss with GenericCallback and Callback.Here the code:MyObj.hpp:class MyObj : public TextureMapper { public: MyObj(); ~MyObj(); virtual void handleClickEvent(const ClickEvent& event); void setAction(GenericCallback<const MyObj&>& callback) { action = &callback; } protected: ClickListener< Box > clickable_box; // Declaring callback type of box and clickEvent GenericCallback< const MyObj& >* action; };MyObj.cpp:#include <gui\common\MyObj.hpp> MyObj::MyObj() : TextureMapper(), action() { setTouchable(true); //clickable_box.setClickAction(action); } MyObj::~MyObj() { } void MyObj::handleClickEvent(const ClickEvent& event) { clickable_box.handleClickEvent(event); }And in ScreenView:ScreenView.hpp:#include <gui_generated/screen1_screen/Screen1Vi
* S6D0154_LCD.h * * Created on: 16-Nov-2020 * Author: NUCLEO */#ifndef INC_S6D0154_LCD_H_#define INC_S6D0154_LCD_H_#include "stm32f103xb.h"#include "stm32f1xx_hal_gpio.h"typedef struct{ uint16_t pin; // LCD Pins interface to STM32. GPIO_TypeDef port;}LCD_PIN_typedef;typedef enum{ write_index, write_WDR, // LCD Operation to be performed. read_status, read_RDR}LCD_OPERATION;typedef enum{ pins_READ, // STM32 port_pins mode for LCD_data_pins interface. pins_WRITE}LCD_INTERFACE_MODE;//................................................//...........LCD_PINS CONNECTIONS................|//................................................LCD_PIN_typedef LCD_D0 = {GPIO_PIN_9, GPIOA};LCD_PIN_typedef LCD_D1 = {GPIO_PIN_7, GPIOC};LCD_PIN_typedef LCD_D2 = {GPIO_PIN_10, GPIOA};LCD_PIN_typedef LCD_D3 = {GPIO_PIN_3, GPIOB};LCD_PIN_typedef LCD_D4 = {GPIO_PIN_5, GPIOB};LCD_PIN_typedef LCD_D5 = {GPIO_PIN_4, GPIOB};LCD_PI
Hello! I've noticed that STemWin from st.com does not work with IARv8.x. The reason is that in IAR wchar_t size is 32 bits and STemWin library has wchar_t size 16 bits. Is there any solution to this problem? Or STemWin is just incompatible with the newest IAR IDE?
Hi @Martin KJELDSEN Hi @Alexandre RENOUX I have a general question. What is the difference between the touchgfx_core.a and the touchgfx_core_release.a library (both for Cortex M7)?. With the release version of the library our application crashes after a certain time, whereas we haven't any issues with the other library-versionIn the documentation I don't find any information, what the difference is between these two versions.Best regardsMarco
Is it possible to have a text label associated with a radio button, such that either may be clicked to select it?
I am using font Noto Sans Regular which contains glyphs for omega and subscript 2. My wildcard range is set to: a-z,A-Z,0-9,0x0040,0x00B0,0x00B2,0x03a9,0x2082. However the characters are displayed incorrectly:-Unicode::strncpy(Buffer, "\u03A9", 10); // displays as O not OmegaUnicode::strncpy(Buffer, "\u2082", 10); // displays as 2 not subscript 2Other unicode characters are displayed correctly:-Unicode::strncpy(Buffer, "\u00B0", 10); // displays correctly as °Unicode::strncpy(Buffer, "\u00B2", 10); // displays correctly as superscript 2I noticed Designer generated file Font_NotoSans_Regular_14_1bpp_4.cpp, containing characters 0x2082, 0x2082, which I have included in the build.
Hi,I'm currently building a Touchgfx interface consisting of multiple screens (30+).Everything is working fine so far, however now I need to implement some sort of popup/warning dialog which can be triggered by the model.Each page needs to have this dialog and I'll probably build it of a container and some basic widgets.How would you implement this without adding the container on every single screen? This seems like it's way to much work considering I'd also need to maintain the MVP structure for each view.Thanks Michael
Hello,I'm using STM32H750IB (touchgfx 4.13.0 with freertos V10.2.1) to control RGB TFT LCD, with external flash and also external SDRAM.The application runs well but sometimes (after 4-5 reboot) the screen remains black, if I reboot the application starts correctly.After some tests I found that the LTDC module goes in FIFO UNDERRUN when the black screen happens. SDRAM is initialize in the bootloader and the LTDC is initialize in the application.How can I solve this problem? Best RegardsNicola
Hi all,I am developing a GUI interface and for a certain screen I get an error at the following function:touchgfx::Drawable::getCachedVisibleRect(void)It tries to read from a memory region that dows not exist and the application freezes there.Thank you for the support.Bests,Gazi
Hi,I came across the missing implementation of CacheableContainer::cachedBitmapId in the following situation:My application starts with a screen where CacheableContainers are used. This first time everything works fine.Then the application switches to another screen.The other screen switches back to the first screen with the CacheableContainers. Now nothing is displayed for the CacheableContainers :(First I thought the problem is caused somewhere in my code. But I could not find any bug in my code. Then I reviewed the CacheableContainer sources and bingo:When a screen is placed in a portion of memory that was used to house another screen, the private member CacheableContainer::cachedBitmapId might not be initialized as expected.This bug is solved by calling setCacheBitmap(BITMAP_INVALID) in the constructor of the first screen. (The source of CacheableContainer.hpp and .cpp led me to this fix.)=> Could you please add a constructor to CacheableContainer and initialize all members whic
Hey, I'm working on custom board Touchgfx project and I'm using Keyboard widget for text input. During testing I found out that keyboard Cancel event is not working properly.Description of problem: When i click and hold on one of keys and drag out of this area the keyboard cancels event and nothing happens as expected. But when i click again on any other or same key and release it in area of this key nothing happens again ( here i would expect that belonging character is written in text buffer). Keyboard starts working normal after second press and release. I tried it also in Keyboard Example in touchgfx UI templates. Example works the same as I described. For better understanding I'm atthacing video.I have already managed to solve these problems by editing the Keyboard.cpp file, but I still report this to clarify whether this is an bug or my misunderstanding of using Keyboard.
hi.I am using STM32F767 to control RGB TFT LCD. Data is output on the screen with TouchGFX.But sometimes the screen momentarily breaks for a very short period of time and then comes back.When I changed the porch value of LTDC, the cycle of symptoms changed.The following is the data on the Porch of my LCD. How to change LTDC's Porch value?current LCD Clock is 32 Mhz.#define T080800480_A1TMN_003_HSYNC ((uint16_t)1) /* Horizontal synchronization */ #define T080800480_A1TMN_003_HBP ((uint16_t)46) /* Horizontal back porch */ #define T080800480_A1TMN_003_HFP ((uint16_t)210) /* Horizontal front porch */ #define T080800480_A1TMN_003_VSYNC ((uint16_t)2) /* Vertical synchronization */ #define T080800480_A1TMN_003_VBP ((uint16_t)23) /* Vertical back porch */ #define T080800480_A1TMN_003_VFP ((uint16_t)22) /* Vertical front porch */ hLtdcHandler.Init.HorizontalSync = (T080800480_A1TMN_003_HSYNC - 1); hLtdcHandler.Init.VerticalSync = (T080800480_A1TMN_003_VSYNC - 1); hLtdcHandler.Init.
Typographies just load few chinese fonts, almost the font I can not find them. Of course, I also put the .ttf files in the assets/fonts.How can I add them in my project?:face_with_tears_of_joy:
Hi everyone,I've removed the previous, textual guide. Instead, here's a video guide on how to get CubeIDE and TouchGFX working on an STM32F746G-DISCO board. I accidentally exported the video in 720p but have created a 1080p version. Leaving both links here because the 720p version may have useful comments and resolutions:1080p: https://youtu.be/VOs2LYO7wSA 720p: https://youtu.be/xZ0pPhQCQUYAnd here's the project i created and modified:https://community.st.com/s/question/0D50X0000At0N95SQE/cubeide-100-touchgfx-4100-working-project-inside-stm32f746gdisco (NOTE: This project does not have the modifications from our STM32F746G-DISCO/CubeMX article).Best regards,Martin
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.