Discuss STM32 and TouchGFX implementations, including configuration, debugging, and optimization.
Most recent activity
I am using TouchGFX Designer v 4.16.1, first I use the GUI template for board STM32F769 Discovery as startup. By default it set my color depth to 16 bpp. But I want to examine other color depth however under Config-> Display -> Color Depth, it only give me one option i.e. 16 bpp. Why? From datasheet, the hardware should support other color depth. What should I do to change my color depth?
I have added the USB device via the CubeMX within STM32CubeIDE, however it have not automatically add the MX_USB_DEVICE_Init() function call at the main function. Do I have to enable something for this ? Or I'll have to manually add them myself?
So I've been facing a strange error where rendering pixels within my internal RAM works without issue, E.G I can fill a frame buffer at the proper length and it fits each pixel to each correct location on the screen as expected. I've been able to render full images this way. For some reason though when implementing the same functionality on my SDRAM located at address 0xC0000000 the first 50 or so pixels render without error but once it reaches a particular width, generally around 100, the pixels begin to get stretched, as in black pixels are being replaced by white ones several pixels to the right and this continues to get worse as you go along until they're being placed in completely incorrect locations. Initially I assumed this had to do with my actually writing to memory, as in I was overwriting the same address or jumping ahead for some reason. After going through the memory inspector I've confirmed that the memory is being written correctly at each address and is not overwriting
Hi,I would like to know how I could go about loading an image from an external device and saving it in flash while modifying the BitmapDataBase (better said : creating another database that serves the same purpose as the BitmapDateBase is overwritten each time a 'generate' is done in the studio) so as to be able to use bmpId afterwards and just use it as any other image. I'm using for now the best solution I've been able to find (far from perfect) : I pre-generate in the external flash X photos (completely transparent) of a given size and format ( 181 * 181, ARGB8888) that I place each in a section of 128K. Therefore, each space has its corresponding bitmapId that I can use afterwards. When I copy an image, I write a signature at the end of the section so as to say that there is, indeed, an image there.However, this solution works only for images of that specific size (meaning that I've to resize smaller/bigger images so as they match these exact dimensions) and specific format. An ima
Witam posiadam płytę STM32F746G-DISCO. STM32CubeIDE_1.5.1, TouchGFX Designer 4.16.1. Ustawiłem zgodnie z: https://www.youtube.com/watch?v=12KXreXaLp0&t=3s mam błąd. Dlaczego?
Hi, I has some questions about how to save data in QSPIFLASH.I notice that when touchGFX is running,the QSPI would be set into memory-mapped mode and status would be busy.User can not write data in memory-mapped mode. I had already assign address for user data.If I create a task stop GUI task and switch QSPI into indirect mode in order to handle data saving . After saving data , task will switch QSPI into memory-mapped mode and release the waitting of GUI task.Am I going thr right way?Can GUI still running correctly after handled by task?If my saving time last for some seconds , Is that means GUI should be no animation after QSPI swtich into memory-mapped mode?Thanks!
In my first screen,it has 4 buttons compare the 4 Swipecontainer pages in next screen.Can I let next screen know which page should be set?
Basically, I'm hoping to try out a different Microphone on SAI_2 and it looks like those pins would be freed up by removing the LCD display.
Hello all,This is not a common question. It is just to report a "bug" I encountered, to get feedback from the forum about my solution and a warning to others that may face this same problem =)I suffered some strange "behaviors" when executing a simple test with TouchGFX Designer v4.16 generated project for the board 32L4R9IDISCOVERY[1]. The display simply stop working after a while.What I have done:I created a project on TouchGFX version 4.16 for this board. Then I designed a screen with just an animated image.On the main file, I created other 4 tasks that only have a delay and asm("nop") (code on below).Behavior:After running for a while, the display simply hangs out. But the firmware is running normally (the tasks are still running).My analysis:We found that in the generated (by the example board, not the TouchGFX) file "TouchGFXHAL.cpp" has some "if" on interrupt calls that caused this behavior.When checking the if (osKernelGetState() == osKernelRunning)its assumption that the
Hi,I finished the board bring up introduction: Board Bring Up Introduction | TouchGFX Documentation without any troubles. I can also write and read to the external flash through DMA2D by using the following function:LL_FillBuffer(LTDC_LAYER_1, (uint32_t *)(hltdc.LayerCfg[LTDC_LAYER_1].FBStartAdress), 1024, 600, 0, (uint32_t) 0xFF008000);static void LL_FillBuffer(uint32_t LayerIndex, void *pDst, uint32_t xSize, uint32_t ySize, uint32_t OffLine, uint32_t ColorIndex) { /* Register to memory mode with RGB8888 as color Mode */ hdma2d.Init.Mode = DMA2D_R2M; hdma2d.Init.ColorMode = DMA2D_OUTPUT_RGB888; hdma2d.Init.OutputOffset = OffLine; hdma2d.Instance = DMA2D; /* DMA2D Initialization */ if(HAL_DMA2D_Init(&hdma2d) == HAL_OK) { if(HAL_DMA2D_ConfigLayer(&hdma2d, LayerIndex) == HAL_OK) { if (HAL_DMA2D_Start(&hdma2d, ColorIndex, (uint32_t)pDst, xSize, ySize) == HAL_OK) { /* Polling For DMA transfer */ HAL_DMA2D_PollForTransfer(&hdma2d, 10);
Hi,I'm struggling with the BSP LCD functions. The goal is to display an image which has transparent background. I'm working on STM32F429I-Discovery board, using BSP LCD drivers.Since the BSP_LCD_DrawBitmap() function seems to expect a real BMP file, which doesn't contain alpha channel information, I want to create my own function for drawing the picture.Currently I'm only displaying a text to verify that the LCD functions are working in general which seems to be fine.For the transparency check, I made a small test loop. Here, a vertical line is displayed pixel by pixel with black color and the alpha channel is incremented for each pixel:for(int y = 0; y < 256; y++) BSP_LCD_DrawPixel(10, y, y << 24);Now, what I expect is that the line will be transparent at the beginning and becoming opaque at the end. But it is drawn fully opaque. I don't know what I'm doing wrong.My main code (without the above mentioned loop):/* Initialize the LCD Layers */ BSP_LCD_LayerDefaultInit(0, LCD_F
I have a toggle button widget directly dragged from TouchGFX designer to the UI. I am unable to manually set the state of the toggle button to True/False using the ForceState (it just flashes between True/False every time I set the state ) Is there a way to i.e. setState() the toggle button and update it's corresponding image?Thanks...
Hello,In order to do some complex animation like screen slide transition, I would like to add a second framebuffer to my touchGFX project on the STM32F469I-DISCO board (800x480 screen). According to the documentation given by ST, I've got 16 MB of external SDRAM to work with which should be more than enough. I've tried the following configurations with CUBEMX:Framebuffer Strategy: Double BufferBuffer Location: By AddressStart Address: 0xC0000000Start Address 2: 0xC00BB800ANDFramebuffer Strategy: Double BufferBuffer Location: By AllocationHowever, when I launch the project on the dev board, the screen always freezes and a lot of colored points appeared. How can I fix this issue ?Thanks in advance,Tristan
I use a scroll list with setItemSelectedCallback. In principle, it works. But our measurement device needs to be explosion proof and therefore it has a rather thick glass above the screen.If an entry of the scroll list is selected, it sometimes happens that the list is scrolled by 1 or 2 pixels. Select callback is not called in this case. As a work around, I have placed a button into the list element. The button works because it is only required that the coordinates at release time needs to be only somewhere within the button. Is it possible that the scroll list is only scrolled after the scroll distance is longer than 1 or 2 pixel?
Also some sample code, just to start, may be useful for unserstanding events and how to connect events to the microcontroller state.
Hello, I have STM32H745I-DISCO and TouchGFX 4.16.1 Designer. As I understand it, TouchGFX does not support the board in my hand. How can I control my HMI? Is there software that supports this card?
Hi,I am trying to understand the graph "precision" as explained here:https://support.touchgfx.com/docs/development/ui-development/ui-components/miscellaneous/dynamic-graph#precision"If for example the level of precision is set to 0.1, each data point added to the DynamicGraph, will be multiplied by 10 internally"I am using a histogram and giving the data points as floats.I set the Precision to 1 and then to 0.1 but did not see any difference in the displayed value.My data point is 20.0f.I thought it would display a value of 200 with a precision set to 0.1.Is the precision only used internally and not for display purposes?Thanks for clarifying the use of this feature.Franck.
Hi there,I am using a 800x480 display that does not have square pixels. Therefore, my custom containers are always "stretched" along the y-axis. This is not a problem for static images in my container, since I can scale the image before on the PC side. However, for more complex assets, like images that need to be rotated, I cannot scale the images on the PC side because the scaling needs to change depending at what angle the image is rotated. In other words, the image needs to be scaled dynamically along the y-axis only. Is there a way to do that with TouchGFX?
I have been working for about 4 weeks on a project which has the STM32L4R5AIIx processorand is using the camera MT9M114 from ON Semiconductor.The project uses the following command to take a snap shot."HYPERRAM_BASE_ADDRESS" is the starting address of the HYPER-RAM memory.HAL_DCMI_Start_DMA(&hdcmi, DCMI_MODE_SNAPSHOT, (uint32_t)HYPERRAM_BASE_ADDRESS, DATA_SIZE_WORDS)When I looked on the scope (I checked the Line Valid line and the Frame Valid line),I could see that data was coming out of the camera chip.But in the DCMI Frame Event callback, there was no data in the Hyper-RAM memory.I know that the Hyper-RAM memory is woeking because I already verified it.I checked further and found that even though data was coming out of the camera chip,the DMA never received a request that there was data in the DCMI buffer.I did this by checking the value of the DMA register "DMA_CNDTRx" in theDCMI Frame Event callback. The value of this register was not incremented to "0"Does anyone know why the
I am using STM32F767ZIT for sensing of temperature using DS18B20 and displaying it on a 5 inch LCD using STemwin. My problem is that when CPU caching is enabled the DS18B20 is unable to fetch any reading(it shows 4095.5 °C which false reading) while when caching is disabled it works perfectly fine. I am using microsecond delay generation using timers of STM32 for temp sensing.
Hello, I am trying to implement bmp to jpeg encode application. I have used official STM code example. There is no compile error.I gather RGB565 data from OV7670 camera. I can successfully write to SD card as 16 bit bitmap file and open it on a Windows PC. Colors sorting is like BGR. I save my file as 24 bit to encode jpeg. When I encode it to jpeg, I see that color sorting is not match with bmp file. Jpeg sorting is RGBbmp sorting is BGRHow can I solve this issue ?In addition, do I need to convert my raw data from 16bit to 24bit for encoding to jpeg ? Can I convert 16 bit bmp file to 16 bit jpeg file ? , If so, How can I ? Best Regardsvoid bmp2jpeg(void) { static struct jpeg_compress_struct cinfo; /* This struct represents a JPEG error handler */ static struct jpeg_error_mgr jerr; /* Encode BMP Image to JPEG */ JSAMPROW row_pointer; /* Pointer to a single row */ uint32_t bytesread; uint32_t index; /*##-3- Register the file system object to the FatF
Hi,Created one simple application in TouchGFX for STM32F429 Disco board. But it struct in backPorchExited() void TouchGFXHAL::taskEntry(){ enableLCDControllerInterrupt(); enableInterrupts(); OSWrappers::waitForVSync(); backPorchExited(); LCD_IO_WriteReg(0x29); for (;;) { OSWrappers::waitForVSync(); backPorchExited(); }}after that code stopping in void MemManage_Handler(void). GUI Code: Screen1ViewBase::Screen1ViewBase(){ __background.setPosition(0, 0, 240, 320); __background.setColor(touchgfx::Color::getColorFrom24BitRGB(0, 0, 0)); box1.setPosition(0, 0, 240, 320); box1.setColor(touchgfx::Color::getColorFrom24BitRGB(16, 68, 233)); box2.setPosition(70, 91, 90, 96); box2.setColor(touchgfx::Color::getColorFrom24BitRGB(0, 9, 255)); add(__background); add(box1);  
Hi, I'm trying to print the string. What is that I'm missing?This is my func : void Screen1View::UpdateWildcardTexts(char* a) { Unicode::snprintf(textArea1Buffer,10,"%s",a); textArea1.invalidate(); }This is how I test it :void Screen1View::setupScreen() { Screen1ViewBase::setupScreen(); char a[16] = "string"; UpdateWildcardTexts(a); }
Hello, does anyone have an *.ioc file or give me the right settings to create a project with CubeMX without using BSP files. Everything is in CubeMX, so integrating BSP files is not needed anymore.I'm struggling with the display settings, concerning LTDC.Current result is wrong orientation and some trash on the screen.Thank you.
It is very frustrating not having information when a program crashes and the stack trace only provides the following: "No source available for "abort() at" Viewing disassembly does not provide it either...Does anyone know how to determine what the source assert message is or must we ask on this forum to have someone at ST tell us what the assert message is when the source is not available?The particular message I am talking about is:No source available for "abort() at 0x8041896"
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.