Discuss STM32 and TouchGFX implementations, including configuration, debugging, and optimization.
Most recent activity
I have started with the DCMI example, but I am trying to modify it to improve performance. The DCMI example calls BSP_CAMERA_Suspend/BSP_CAMERA_Resume for every frame. From my testing, this seems to reduce the framerate by half. I would like to continuously run the DCMI, using the double buffer DMA to ping pong buffer each frame into two separate full-frame buffer locations in the SDRAM.I have this ping pong buffering working, however, whenever I try to use one of the SDRAM frame buffers - copy them to another area in SDRAM or push them to the LCD SDRAM Frame buffer, I get a HAL_DCMI_ERROR_OVRIs there perhaps a conflict with using the SDRAM for the LCD while the DCMI is DMA buffering to the SDRAM? Any suggested solutions?
I have stm32f7508-DK ,i am trying to execute the project examples located in ,<STM32CubeF7-master\Projects\STM32F7508-DISCO\Examples\BSP><STM32CubeF7-master\Projects\STM32F7508-DISCO\Examples\LTDC>but i cant able to see any action on lcd display,while running the code debug mode nothing display on lcd , after few seconds code stops with error (refer attached img file)i want to know how to execute the example project on discovery board?
For example I have the following frame buffer data with mostly 0's and only the first value populated with a blue color.static const uint32_t image_data[480] = { 0x000000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, . . 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, . . 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }With LTDC PixelFormat set to LTDC_PIXEL_FORMAT_RGB888 - I get the following output on the LCD. A single blue line on the left-most side of the LCD. I think I can reason about the output but this still raises a question. I was expecting the first value from the frame buffer data to represent a single point on the screen not an entire line. How would I represent a single point if not like this? I can reason about the color of the line since the value is 0x000000ff and the 2 least significant bits represent blue. The following 2 bits represent green, The ne
I tried fdcan, touchgfx with stm32h7b3i-eval. I want to operate the SD card additionally, but it doesn't work.Here are the ioc settings:SDMMC1 -> SD 4bits Wide busFATFS -> check SD CardIf you disable "use dma tempate", it works, but if you want to use it with rtos, you have to enable it, but it doesn't work in this part.f_open() returns FR_NOT_READY...Please take a look at my project and point out the problematic parts.thank you.
I was working on my fairly large application, when I copied a screen that was similar to what I needed and made some edits. I was unable to compile the program, because it could not find some __SingleUse constants. I closed the project, and then could not reopen it again. I got a dialog saying 'Object reference not set to an instance of an object'.After hours of frustration, I was finally able to recover my project by manually editing the texts.xml file after comparing it with the .touchgfx file to see what the differences in single use texts were.After this, I created a simpler version of an application that generates the same failure and created a support case with ST.I have copied many screens in my application and edited them, and not had a problem. I'm not sure why I had this issue, but all I did was copy and paste a screen, which contained Single Use TextArea widgets and a button, as well as some interactions.To recreate the error in my simplified version, I copied and pasted the
I am creating a user interface in German and English language. In order to compare the german and english presentation it is quite often necessary to switch between the selected language. This is currently only possible by several steps:select the "Config" button in the left side menuthen change the Selected Language in the Pulldown optionthen change back to the Canvas menuIt would be a great help to have a more direct access to the language change function via a separate menu entry, which is always accessible in the canvas presentation or maybe even a keyboard shortcut. If there is already something like that available, then I am thankful for a hint. BR GS
Hi!I am unable to find this feature inside the TouchGFX app... Does this mean I need to uninstall and the reinstall to get the last version?Please help, thanks in advance
My plan is to create a new task for my code, where I generate a hardware timer for PWM output with an interrupt. And on every interrupt trigger I want to execute some code.The problem is my GUI freezes when the timer starts, and the maximum frequency I can get is around 400KHz, while my target frequency should be at least 10MHz to get it to work and it's best if it can handle a 20MHz~100MHz frequency. It's used for an external ADC IC, and on every rising clock edge I want to read 8 GPIO pins to get an 8-bit ADC value.I feel like RTOS should be able to handle this signal, and I've read some blogs on using hardware timers with FreeRTOS vs using 'a ISR from FreeRTOS'. But that quickly ended up a dead end or I had to dive deep in FreeRTOS.Does anyone know how I can get my timer PWM generation to work, allowing me to execute some code on every pulse or period without a chance to miss these, while running a FreeRTOS project? Or should I drop FreeRTOS and run TouchGFX and my stuff without OS?
Here are my programs:const int FontCacheSize = 10000;uint8_t fontdata[FontCacheSize] __attribute__((at(0XC0E00000))) __attribute__ ((aligned(4)));FrontendApplication::FrontendApplication(Model& m, FrontendHeap& heap) : FrontendApplicationBase(m, heap){ FIL fil; /* File object */ FRESULT fr; /* FatFs return code */ UINT br; fontCache.setMemory(fontdata, FontCacheSize); /* Open a text file */ fr = f_open(&fil, "0:/Font_VINERITC_TTF_20_4bpp.bin", FA_READ|FA_WRITE|FA_OPEN_ALWAYS); if(fr == FR_OK) { fr = f_read(&fil, fontdata, FontCacheSize, &br); fr = f_close(&fil); new (&bf) BinaryFont((const struct touchgfx::BinaryFontData*)fontdata); TypedTextDatabase::setFont(Typography::DEFAULT, &bf); }}Sometimes it able to work. But , if I touch the screen the program will crash. Most of
When I malloc the fontdata[2048] in internal RAM, it work well. But when I malloc fontdata[2048] in external RAM, it go into HardFault. The external RAM is SDRAM ( W9825G6KH 32MB ). This is the code:#include <gui/common/FrontendApplication.hpp>#include <fonts/GeneratedFont.hpp>#include <texts/TypedTextDatabase.hpp>#include <stdio.h>uint8_t fontdata[2048] __attribute__((section(".ARM.__at_0xC14B0000")));//binary font object using the dataBinaryFont bf;FrontendApplication::FrontendApplication(Model& m, FrontendHeap& heap) : FrontendApplicationBase(m, heap){ LoadFontFile("1:/Font/Font_simkai_40_4bpp.bin", Typography::LARGE);}void FrontendApplication::LoadFontFile(const char* fileName, const touchgfx::FontId type){ //read the binary font from a file FILE* font = fopen(fileName, "rb"); if (font) { //read data from the file fread(fontdata, 1, 2048, font); fclose(font); //initialize BinaryFont object in bf using placement new new (&bf) BinaryFont
Hello! I want to do my petproject with stm32 and display.Ran into a problem with a choice of model supporting large resolution (5' 720*3RGB(H)X1280(V) for example).I tried filter in STM32Finder with TFT LCD (394 items found), but i need to look at each model for details. Example in attach. How I can find all with supporting +/- 1280*720?May be I do something wrong and is there an option to choose a cheap stm32 and some separate video module for such a resolution?Tell me, please, how to do it right?
Could someone show me the exact steps? I have done this below but it's not doing anything. Do I need to do something in the view.cpp too?#include <gui/containers/topBar.hpp> int a=5; topBar::topBar() { } void topBar::initialize() { topBarBase::initialize(); } void topBar::handleTickEvent() { a++; Update(a); } void topBar::Update(int number) { Unicode::snprintf(textArea1Buffer, TEXTAREA1_SIZE, "%d", 5); textArea1.invalidate(); textArea1.resizeToCurrentTextWithAlignment(); textArea1.invalidate(); }
I recently managed to download the STemWin software from ST site, and was wondering if there is a link to any example or tutorial which would show how to incorporate this library and what parameters need to be configured. I have seen a few posts with older versions of CubeMX and stmcubeIDE using STemWin but since I am unable to add STemWin under Graphics option in CubeMX I am unable to integrate it. I am using stm32f469NIH discovery board for the tests,
I am trying to initialize my W25Q128jv External Flash in my project, but I am not able to write on it and I think it could be because of the Memory Mapping Mode but I really don't know. For this project I will need my QUADSPI when I will add TouchGFX to save some items, but for now I am only trying to do a for cycle to verify that it works and its performance. If I disable MemoryMappingMode to write, it goes in HardFault.uint32_t *flashbuffer = (uint32_t*)0x90000000; const uint32_t size = 1000; int begin = HAL_GetTick(); for(i = 0; i < size; i++) { flashbuffer[i]=i; } int end = HAL_GetTick();Here is MX_QUADSPI_Initstatic void MX_QUADSPI_Init(void) { /* USER CODE BEGIN QUADSPI_Init 0 */ /* USER CODE END QUADSPI_Init 0 */ /* USER CODE BEGIN QUADSPI_Init 1 */ /* USER CODE END QUADSPI_Init 1 */ /* QUADSPI parameter configuration*/ hqspi.Instance = QUADSPI; hqspi.Init.ClockPrescaler = 1; hqspi.Init.FifoThreshold = 4; hqspi.Init.SampleShifti
Hello,i try to create a scroll wheel with some texts as items.So i created the container and the highlighted container.Then i created a Group in the Texts "Scrollwheelgroup" with 6 Resources inside.FristResource, SecondResource, ......I want to show these Resources in my Scroll Wheel.Does anyone have an example not using numbers like in the example of TouchGFX?If the language is changed it will also change the contect of the scroll wheel, thats why i want to do it this way.Thank you very much.
I'm using an STM32H7A3IITxQ and trying to get an image (JPEG, 320x240) from a camera via DCMI, decompress it and display it on a screen via LTDC.It currently seems like I'm getting a valid JPEG picture from the camera, as there is "Start of Image" and "End of Image" in the buffer and about 4kBytes of data. (https://de.wikipedia.org/wiki/JPEG_File_Interchange_Format)I'm also able to display data on the screen via LTDC. (Set up TouchGFX and FreeRTOS)My current problem is the decompression of the JPEG with LibJPEG. I copied the code from an example and modified it, since my JPEG is in a buffer and not a file on a SD-card.(STM32Cube_FW_F4_V1.27.0\Projects\STM32446E_EVAL\Applications\LibJPEG\LibJPEG_Decoding)void jpeg_startDecode(uint8_t* inBuf, uint32_t inBufNum, uint8_t* outBuf, uint32_t outBufSize) { /* Decode JPEG Image */ JSAMPROW buffer[2] = {0}; /* Output row buffer */ buffer[0] = outBuf; /* Step 1: allocate and initialize JPEG decompression object */ cinfo.er
..
Windows 10, TouchGFX Designer 4.18, STM32CubeIDE 1.7.0STM32F469-DISCO board with 800x480 DSI display.I'm trying to create a TouchGFX project, for which I can edit the visual part in TouchGFX Designer and the rest in STM32CubeIDE, so that I can edit stuff in the designer, save it and then go to STM32CubeIDE, compile it there and upload to the board. So far without success. I've been occasionally trying to do this for a few months. I try for a few days (heavy brainstorming), doesn't work, I give up (due to feeling helpless and demotivated and due to lack of possible solutions). Tried with designer 4.16 and cube 1.6.0 initially.Now, I haven't found a single valid google result on how to do it and only a pair of vids on YouTube (by EE Karl). There is pretty much no other information on the topic in the google, I googled my fingers to blood.-----------------------------------------------------------------------A little premise about how I got into this situation:I would want to go the other
There's a dev board with a lcd, but the U5 doesn't seem to have support for the same LTDC that that chips like stm32L4 or stm32F7 does.https://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-mpu-eval-tools/stm32-mcu-mpu-eval-tools/stm32-eval-boards/stm32u575i-ev.html#overview
When I'm using TOUCHGFX and FATFS together, I can create/write/read a file in my SD only if I do it before "MX_TouchGFX_Init();"f_mount(&SDFatFS, (TCHAR const*)SDPath, 0);f_open(&SDFile, "DIO.TXT", FA_CREATE_ALWAYS | FA_WRITE); //with TGFX this one gets FR_DISK_ERRf_write(&SDFile, wtext, sizeof(wtext), (void *)&byteswritten);f_close(&SDFile);f_mount(NULL, (TCHAR const*)SDPath, 0);Not sure if this can be helpfull but the only difference I notice it's that when I debugging:If there is MX_TouchGFX_Init();, after f_mount(), FatFs gets the value : 0x2000a6a4 <SDFatFs>In other case, FatFs is equal to the value : 0x2000a2fc <SDFatFs> Do you know if there is something I can do to make them working well after with the graphic application?Thank youEDIT: I resolve it. I suppose because MX_TouchGFX_Init() is written in C++ inside that the FATFS methods could not be read in C so I put it inside a task and it works!!!
Hello,If i have one "Master" project and want to use it with several touchgfx projects, what would be the best way?So lets say i have the IDE project, Visu1 and Visu2 in GIT.The changes of the Master IDE should be used in both TouchGFX projects.Does anyone have an idea how to best solve this?Thanks.
Hi,I´ve done a lot of reading and testing...For some reason, its stated in both the datasheet and the DCMI application note that 24 bit per pixel formats are not supported. Trying to understand why...The DCMI is "stupid" in the sense that we only tell it how many bytes to read.It doesn´t know anyting about the format and just shuffles data through DMA into the buffer.I´ve done a lot of testing with the eval board and the OV5640 camera but for some reason get the wrong colors (or something mismatches). Even though with making sure that the pixels number align with correct number of 32-bit words.I was just hoping that someone has an explain why it doesn´t work...
I made a test project for my discovery board with TouchGFX.I needed the UI to react for a pin state change.I've seen tutorials, where a GPIO accessing function was added to the `main.c` file. Then it could be added as `extern "C"` from `Model.cpp` file.It looks awful! The main.c file is huge and full of generated stuff, even finding my function there is challenging.So what I'm looking for is a way to just put my additional code into a separate header file.The problem is the STM32CubeIDE project doesn't even have headers directory.Another weird thing is VS showing a warning about my externed function, because it doesn't have the file it was defined in its `Application` project. However, when the code is compiled for the device, the symbol can be linked and my test application works.What is the proper and normal way of calling `HAL_GPIO_ReadPin()` from my VS project?The only way I found is to add the function that does it to the `main.c` from STM32CubeIDE project level, then extern it in
I'm generating a sine wave with DMA and DAC.Bare metal coding i'm able to reach 20 khz wich is the frequency i need.Introducing touchgfx and freertos i'm not able to reach over 1 khz.lowering the number of samples of the sine wave for the dac i'm able to rise the output frequency but not high as expected.Does touchgfx introduce different priorities for timers or timer source?I found a bug that the CubeIDE generates the DMA_Init() function afer the DAC_Init() so switching that resolved DAC totally not working.Now i'm faced with the problem i described in th previous lines.The TouchGFX engine calls some FreeRTOS tasks that via HAL functions activate the dac and generates the waves.Thank you, any help might be useful.@Alexandre RENOUX @Romain DIELEMAN
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.