Discuss STM32 and TouchGFX implementations, including configuration, debugging, and optimization.
Most recent activity
I'm having an issue with my framebuffer generated by TouchGFX. Source code is not provided for this section of the engine. Due to constraints of the STM32F4 I can only write to my external SDRAM in 32 bit words. However the touchgfx::LCD24bpp::fillBuffer wants to write it with 8 and 16 bit pointer pointers. My TFT display is an RGB888. Is there a hook or some other thing I might be missing? Thanks for any help.
Hi, In a touchgfx based UI. I have a scroll list that has more than 5 items for displaying on the screen, but at a time only 4 scroll list items can be displayed on the screen. For reference, I have provided a snapshot of the screen.Push-button interfacing is for screen navigation, as it is not a touch-based screen.How can I scroll the list vertically down so that it can display the other scroll list items?
..
Thank you for helping.Please tell me the amount of RAM and ROM used by TouchGFX.The version is 4.16.1.Thank you.
From my understanding, in the MVP model implemented by touchGfx, the view is intended to manage the UI element of a screen while the presenter is intented to manager the logic running in background (for instance hiding/showing elements based on information received from the model). My question is: where should we put the calls to GotoxxxScreen() ? If i follow my understanding, i would put it in the presenter (or eventually in the model), but if i look at the various example as well as the calls implemented by touchGfx Designer, they are put in the view. Moreover the view have a shortcut to the application() while the presenter must go through static_cast<FrontendApplication*>(Application::getInstance())So i'm a bit lost on where is the best/advised place to programatically switch screens.Thanks,Laurent
I'm building a complex application with multiple screens in TouchGFX 4.16.All those screens have the same menu bar with indications like battery energy level, time, etc.All screens include the MenuBar custom component.When the battery level changes, I want the model to be able to update MenuBar.Currently, I'm doing this to update the battery:In Model.cpp bool bShouldNotify = pollBatteryState(); if (bShouldNotify) { modelListener->notifyBatteryStateChanged(m_oDeviceState.oBattery); }In SomeScreen1Presenter.cppvoid SomeScreenPresenter::notifyBatteryStateChanged(oBatteryState_t const oBatteryState) { view.updateBatteryState(oBatteryState); }In SomeScreen1View.cppvoid SomeScreenView::updateBatteryState(oBatteryState_t const oBatteryState) { // Update widgets MenuBar.updateBattery(oBatteryState); }If you need to do this for all screens, this will create a lot of code.Is there a better way to update views that all use the same component?An event-based system maybe?Regards,GB
I use in my code setAlpha , but now dont exist. Why?class PainterRGB565 : public AbstractPainterRGB565 { public: /** * Initializes a new instance of the PainterRGB565 class. * * @param color (Optional) the color, default is black. */ PainterRGB565(colortype color = 0) : AbstractPainterRGB565(), painterColor(0) { setColor(color); } Now only setColor here.
Question is if TouchGFX framework supports 256 colors? How to tie together hardware CLUT settings and framework?Due to internal RAM size limitations, I want to halve the framebuffer size by reducing the color depth from 16 bpp to 8 bpp . I cannot use the partial buffer strategy because my display has an RGB interface and no internal GRAM.Firstly without TouchGFX enabled I changed LTDC setting PixelFormat to L8 and enable CLUT with some random colors to see if hardware settings are ok. That setting works, I can see my colors.Now I make TouchGFX Designer application with 8 bit color depth option. After creating UI in simulator and see it in 256 colors style as expected. But on my target board everything is drawn in 256 grey scale.There are references in the documentation about 8 bpp bitmaps for images to reduce flash occupied by them. But my goal is to reduce RAM for framebuffer, is it even possible.
hi im driving ili9341 lcd with spi1 and w25q128 with spi2 with stm32f103c8t6.im loading some images from w25q128 to lcd via dma (peripheral to peripheral).i should check if the last image has been sent to lcd or not before putting other images . so i used :_Bool LCD_BUSY before sending new data to lcd i will check it .....but i get stuck in while loop for ever . and in debugger it says that (_Bool LCD_BUSY ) is 0 !!!but if i put HAL_DELAY(1); in while loop it will work !not WORKING: while(LCD_BUSY){}working;while(LCD_BUSY){HAL_DELAY(1);}
hello i would like to ask if i can send some data (numbers for exemple ) from my screen STM32F469I-DISCO to my system using EasyCAT Shield (ethercat protocol ) you will find attached photos as an examplebest regards
Hi.Is there a simple, complete example on how to use a Wildcard that can populated in real-time with custom values? That is, change a counter every few seconds or similar.For example, reading from an I2C widget and then print onto the display? So far, have most of the day invested to learn but failing. What a painful exercise this has become. Here is what I have so far:1) Used TouchGFX to create a textArea1 with Wildcard1 -> wildcard buffer set to 10.2) Initial value is blank.3) After much trial and error, able to print my value using the following code:Screen1View.cpp#include <gui/screen1_screen/Screen1View.hpp> #include <texts/TextKeysAndLanguages.hpp> #include <touchgfx/Color.hpp> #include "stm32f4xx_hal.h" // Keil::Device:STM32Cube HAL:Common Screen1View::Screen1View() { } void Screen1View::setupScreen() { textArea1.setTypedText(TypedText(T_SINGLEUSEID1)); textArea1.setXY(88, 180); textArea1.setColor(Color::getColorFrom24BitRGB(0xFF, 0xFF,
Hello, I have a custom container with clicklistener, and I add two of this in my screen.How to distinguish which custom container was clicked?void CustomContainer::boxClickHandler(const touchgfx::Box& b, const ClickEvent& evt){ if (ClickEvent::PRESSED == evt.getType()) { // How to distinguish which custom container was clicked? ... } else{}}
Some Background:MCU: STM32L4R9ZGJ6SDK: STM32Cube_FW_L4_V1.14.0Programmer: STM32CubeProgrammer v2.2.0External Flash: OSPI (MT35XL512ABA1G12)Application IDE: STM32Cube IDE 1.6.1External Loader IDE: Keil uVision 5.16aProject is was started on the STM32L4R9I-DISCO development kit. We have been on a custom board for over a year without issues.Hello,I encountered a strange issue today when loading data to an OSPI flash memory using a custom external loader (*.stldr). This external loader has been working fine for ~2 years when loading ~2MB of GUI assets to OSPI flash and has not changed during this time. Today, I attempted to write 32 bytes of data to a specific region in OSPI flash in addition to the GUI assets that are already written and the 32 bytes result in a write failure. If I write 16 bytes it works fine. Trial and error testing shows that if I write anything beyond 16 bytes in addition to the GUI assets, the write fails. The data being written is not contiguous and the 32 bytes are
Good morning, I have a custom board that mounts an STM32h7a3 with a tft SDT04302CT-A40 and I should graphically display the values of an array that is loaded by a thermal sensor (MLX90641), I can not use TOuchGFX, how can I integrate code?
Hi there. I am using the STM32L4S9ZIY6TR MCU (just because its MIPI-DSI 2 lanes properties) . But when i try to configure the pinout with the ST Cube application, the DSI_MIPI is not selectable. What i am doing wrong? Thank you so much in advance !
I am using TGX v4.16 on F4 hardware.In the first version of my application, to give all of my views the same basic look, I created a template view to be inherited by the view classes. The template created a "header" and "footer" on each view. A user used controls in the footer that to make the view change the custom container shown in the middle of the view. So basically the content changed and it looked like a new screen but from the code's perspective it was all the same view.I now need to make a second version of the application. This will be a significant update so I am free to reevaluate my design. My question is this: from an architecture/maintenance approach, is it better to stick with the existing design or replace the custom containers with view classes? (I would still keep the template class that all views inherit.) So for example if I now had three view with four containers each, if I went with making everything view classes, I would end up with 12 different view classes.Giv
In a touchgfx based UI, I am able to display the text in the scroll list under the details box. But the length of the text is more, so that is not able to fit in a single row. I want to add one more row in Fault 1box. For reference, I have attached the image snapshot which has the current UI displayI want to add one more row (row 2) in the Fault 1 tab as shown in below image snapshot Note : scroll list tab (that is Fault 1 and Fault 2 tab), is displayed according to condition. And message/text inside this tab changes according to condition.
I have implemented a screen transition from screen1 to screen2 upon receiving event from Backend in Model class. But it lead to task exit on error.Snippet to change screen:application().gotoHomeScreenNoTransition();What I know so far:Only happen on target, does not happen on simulationOnly happen after I add additional widgets on screen2 with additonal codesIncreasing the task stack size does not helpIncreasing heap size does not help.Can someone give me some pointer please. following is callstack, here GUIUpdaterTask is actually default TouchGFX task, I just renamed it. [__exit + 0xb][_Znwj + 0x1b]std::_Tree_comp_alloc<std::_Tmap_traits<MenuOverlay::MenuId, ListItem::ItemProps, std::less<MenuOverlay::MenuId>, std::allocator<std::pair<MenuOverlay::MenuId const, ListItem::ItemProps>>, false>>::_Buyheadnode()std::_Tree_comp_alloc<std::_Tmap_traits<MenuOverlay::MenuId, ListItem::ItemProps, std::less<MenuOverlay::MenuId>, std::allocator&
Hi, I've just managed to get 4.18 to show into STM32CubeIDE and fairly happy about that. However quite shattered to find out that some of the same 4.17 bugs remains... among a new one that is new to me (Videos.s). All in all, the default generated code does not compile and consequently makes TouchGFX unusable. Quite unfortunate.Anybody had any luck getting around the now old 'touchgfx_init' and 'touchgfx_taskentry' bugs?ps. the videos.s bug (1st screenshot) can somehow be fixed by simply deleting the entry from the resource tree.
I am working on touchgfx LCD. I need a a support to develop our custom application.i have seen touchgfx API functions setup screen but i need example for better understanding.
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.