Discuss STM32 and TouchGFX implementations, including configuration, debugging, and optimization.
Most recent activity
Posted on April 07, 2016 at 13:15I'm trying to build a first graphical LCD project with Visual GDB (which lets you use Visual Studio for embedded development using the ARM GCC toolchain). I can't find any sign of any of the LCD_IO_ routines in the HAL firmware (I've got the F1 stuff). Perhaps its missing and Segger's stuff wasn't used for the demo on the 3210C, but from the presence of the STemWin_HelloWorld in the F1Cube firmware in Projects\STM3210C_EVAL\Applications\STemWin I have built this with IAR's EWARM, but I don't have the mapfile anymore to see where it got the functions from. I've got the ili9320 & 9325.c's added into the project, so there must be an SPI layer between these 2 files and the LCD. Segger defer to ST for first line support of emWin. #segger-emwin-lcd-driver
Posted on April 11, 2016 at 12:51Hi, I'm using a Discovery board with an STM32F469NI on it. I'd like to know more about how to set the LCD display refresh rate to a particular value. I've been through the spec sheet and reference manual and there's no direct setting so I need to learn what registers can be used to set it to a particular value (eg 800x480 @ 60 Hz). Thanks. #display #lcd
Posted on April 06, 2016 at 08:35Hello, When I try to draw JPEG�s I get a faulty display.http://www.ecs-online.dyndns.org/Uploads/Original.jpghttp://www.ecs-online.dyndns.org/Uploads/Incorrect.JPG MS_LoadFileIntoMemory(&fileNames[currentSel][0], arrayImagePreview1, MEMORY_SPACE_IMAGE_PREVIEW_1, USBH_Path, &realFileSizePreview1); prepareDrawPicture(); //For newXPos, newYPos, numeratorDraw, denominator GUI_JPEG_DrawScaled(arrayImagePreview1, realFileSizePreview1, newXPos, newYPos, numeratorDraw, denominator); int MS_LoadFileIntoMemory(char *fileName, char *fileBuffer, uint32_t fileSize, char* _Path, uint32_t* realFileSize) { uint32_t numberOfBytesRead; //Anzahl der tats�chlich gelesenen Zeichen uint32_t numberOfBytesToRead; //Anzahl der zu lesenden Zeichen int result; //Ergebniss der FAT Aktionen char file_path[MAX_FILENAME_LEN + 4] = ''''; //Pfad zur Datei, + SD_Path l�nge (''0:/'') + String End Zeichen FIL file; //Datei Handle //Fehlerpr�fungen assert_param(fileBuffer != NULL
Posted on April 04, 2016 at 20:10Hello,I have made custom board with stm32f429 without external SDRAM.I'm trying to drive 4.3'' TM043NDH02 16.7M color TFT. In my first try I have took as an example of emWin ''Hello World'' demonstration under stm32f429iDiscovery folder. I just modifed LCD timings and deleted ili9341_init driver rutine because in my case I dont need to initialize TFT driver(right?) of the TM043NDH02 which ise HX8257A.I have got 2 huge problem which have to solve very quickly: I'm getting hard fault error when I'm entering GUI_DEVICE_CreateAndLink function inside of LCD_X_Config().I'm getting hard fault error if activating HAL_LTDC_ProgramLineEvent(&hltdc, 0); that function inside of the LCD_LL_Init() function.I need some tips & tricks to solve these issues quickly.Have nice days without bugs :) #tft #stm32f429 #emwin #hardfault
Posted on March 11, 2016 at 10:36 By default, if one uses the BSP_LCD_Init() function provided by the library ''stm32469i_discovery_lcd.h'' to set up the LCD screen of an STM32469I-Discovery board, the screen orientation will be landscape. If one wants to change it to portrait instead, he or she will have to use BSP_LCD_InitEx(LCD_ORIENTATION_PORTRAIT) but unfortunately that does not work and all you will get is a blank screen because there is a bug in said function. As it turns out, some settings within the function were mixed up. The following is the corrected version which fixes everything and finally gives users the ability to switch to a portrait orientation. The problem can be found beginning from line 252 of the source code ''stm32469i_discovery_lcd.c''. /* Timing parameters for all Video modes * Set Timing parameters of LTDC depending on its chosen orientation */ if(orientation == LCD_ORIENTATION_PORTRAIT) { VSA = OTM8009A_480X800_HSYNC; //Originally OTM8009A_480
Posted on March 27, 2016 at 04:22I've recently started working with the STM32F469 Discovery board with the intention of checking out using DSI to drive an LCD. The examples I've seen for DSI are all HAL-based and I was wondering if there was any documentation or examples using the SPL? #dsi #mipi
Posted on March 26, 2016 at 18:09I used the STemWin_SampleDemo from the STM32F4 Discovery SDK to run my program. I find out that if I put WM into menu controls, when I delete(WM_DeleteWindow) the menu widget, that MCU will appear HardFault_Handler. But emWin official simulation program can be successfully closed menu widget, it will not cause any problems on the memory. So how can I solve this kind of situation? Appreciate it. #stemwin
Posted on March 07, 2016 at 16:52 This is from the 1.0 driver. (I'm downloading the next version but it is going. Real. Slow.) From STM32Cube\Repository\STM32Cube_FW_F4_V1.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dcmi.c InHAL_DCMI_Stop() on line #416 the driver sets the state to 'ready' after disabling the DCMI IP. /* Change DCMI state */ hdcmi->State = HAL_DCMI_STATE_READY; If we now callHAL_DCMI_Init() (instm32f4xx_hal_dcmi_ex.c) there is coded to skip the initiailzation of the IP if the state is not reset: if(hdcmi->State == HAL_DCMI_STATE_RESET) { /* Init the low level hardware */ HAL_DCMI_MspInit(hdcmi); } Is this a bug or am I misunderstanding something about how the HAL DCMI library works? Thanks! NB, the download failed but a coworker provided a copy of this file from the 1.0 version and it is the same. #dcmi-stm32f4
Posted on March 09, 2016 at 14:24Hi all, I have problem with displaying any data at WF57STIACDNN0 TFT display. This is a TFT display with ST7511U driver. In my SW driver I successfully pass the display initialization procedure - I see some randomize pixels set, but I am NOT able to display any data by write RAM command - 0x2C (ST75_WRAM). First my goal is to clear whole display and set each pixel on the screen. For communication I am using 4 line (A0 + SPI). In the past I only wrote some drivers for easy ALPHA display so I have no any knowledge about graphic display. Below I will put by initialize function and function where I would like to clear whole display area. static void display_init() {CS_ENABLE; spi_write_command(ST75_SWRESET); spi_write_data(0xa5);//Power Control spi_write_command(ST75_PWRCTL); spi_write_data(0x8f); //booster setting = ''10'' = -2 ?? spi_write_data(0x04); //SAMPSet = ''100'' ?? spi_write_data(0xa5); //WARNING in spec is 0x0a5 ?? spi_write_data(0xa5);//Elec
Posted on February 11, 2016 at 21:18So I've been through the HAL, the CubeF4, and the StdPeriph library. There are many functions to do many things to the LCD but I cannot for the life of me find one to rotate the LCD or initialize it in with a landscape or portrait type orientation.I have seen some parameters such as LTDC_VerticalStart but what exactly the parameter controls is unknown and not documented.I have discovered that by manipulating the MADCTL bits in the ili9341.c the orientation can be changed. But then then I have width and sync issues.I just don't get why ST went through all that trouble to create an interface for the LCD and touchscreen, then left out something so simple. Or is it there and I just don't see it? BTW I don't want to use SPI to control the LCD, so please don't suggest using a third party SPI library. I want to use the LTDC lib.I've read the ili9341 datasheet, its not very helpful either. #lcd-tft-ltdc-stm32f429
Posted on February 25, 2016 at 08:51Hello, I using STemWin, but I don't want to use window manager when I call GUI_Init() function and get GUI free bytes(GUI_ALLOC_GetNumFreeBytes()) it's always reduced 2.5K for GUI's memory (I see emwin user guile, window manager requirements 2.5K RAM) I close the GUI_WINSUPPORT in GUIConf.h &sharpdefine GUI_WINSUPPORT (0) and don't use any GUI function get same results how can i do to close window manager? Thanks. #stemwin
Posted on February 15, 2016 at 11:23Hi all Problem exists in custom board with adapted BSP from stm32f7 discovery. For ov2640 sensor I use component library from stm32cubef2.If initiate a camera with any resolution and begin transferring getting only one interrupt DMA2_Stream1_IRQHandler once.At the oscilloscope vsync and hsync, PCLK look good.I've tried everything nothing helps.Thanks for any help. #stm32f7-hal-dcmi
Posted on February 12, 2016 at 13:38Hello, I am currently working with STM32F439ZI microcontroller and interfaced SPI LCD having 144x128 resolution with MCU. STemWin library is used to run my GUI on LCD. Currently I am facing issue of how to rotate LCD to 90 deg anti-clockwise and 90 deg clockwise. Currently in my code, I have used ''GUI_DEVICE_CreateAndLink(GUIDRV_LIN_1, GUICC_1, 0, 0)'' API and it works fine. But now I want to rotate my LCD screen. To rotate the screen, I am using ''GUI_DEVICE_CreateAndLink(GUIDRV_LIN_OXY_1, GUICC_1, 0, 0)'' API but I am getting Linker error like ''no definition for GUIDRV_Lin_OXY_1_API''. Also I have tried with set orientation API but I got distorted screen after using this API. Is there any other way available to rotate the LCD screen? Can you please give some suggestions/guidance regarding how to rotate LCD using STemWin Library? Any help in this case is highly appreciable. Thanks, Nipam #lcd #stm32 #guidrv_lin #stemwin
Posted on February 08, 2016 at 14:40hello, I want to interface SSD1289 lcd controller to stm32f103zet6 micro controller. I'm trying to understand the FSMC timing computations but to no avail. I referred to application note and found the following. Could anybody please explain how these values are calculated. DATAST appears in equations for read and write. It will give two different values from these two different equations. SSD1289 has following timing characteristics. <<UNABLE TO POST IMAGE HERE, SO ATTACHING THOSE FILES>> I really don't know how to go about this. Isn't the tcycle-read(1000 ns) in above sheet too much. can FSMC handle that? I want to read and write to LCD. Kindly show me how to calculate the timing values. Thanks! #ssd1289 #stemwin #fsmc #stm32f1
Posted on February 08, 2016 at 08:01Hi dear members,I want to interface jhd12864 lcd using Stemwin library, The segger document says that you can configure the KS0108 driver in the run time using GUIDRV_SPage.But GUIDRV_SPage.h file is not included in Stemwin distribution..Please help me out in this. #guidrv_spage #stm32f4 #stemwin
Posted on September 14, 2014 at 13:13Hi everyone. I'm having trouble writing images from a camera to a microSD card on my STM32F4 Discovery board. The SD writes keep getting stuck in the HAL function, SD_DMA_RxCplt(). I'm using FAT_FS, so even though I'm writing, the file system book keeping still needs to read.* Wait until SD transfer is complete */while(hsd->SdTransferCplt == 0){}One huge clue is that this only happens when I set the SD clock to be faster than 1/12 of the AHB speed (168 MhZ). Similarly, if I turn off the DCMI capture interface, I can use any SD clock speed within spec.This seems to be some issue with DMA. I'm using DMA2 for both the SDIO and camera interface, so could there be FIFO overflows or lost interrupts causing the SD read to never be completed? How can I fix that?The camera clock is 16MhZ, so the maximum data rate is 16MiB/s (usually much less (< 2 MiB/s) since the images are JPEG). The DMA configuration is circular buffer, no FIFO, 1 word b
Posted on January 07, 2016 at 14:39Hi,I'm using a STM32F429 connected to a TVP5150 through DCMI interface.DMA is used to transfer data from DCMI to the external DRAM through the FMC.DMA is configured as follow:hdma_dcmi.Instance = DMA2_Stream1; hdma_dcmi.Init.Channel = DMA_CHANNEL_1; hdma_dcmi.Init.Direction = DMA_PERIPH_TO_MEMORY; hdma_dcmi.Init.PeriphInc = DMA_PINC_DISABLE; hdma_dcmi.Init.MemInc = DMA_MINC_ENABLE; hdma_dcmi.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD; hdma_dcmi.Init.MemDataAlignment = DMA_MDATAALIGN_WORD; hdma_dcmi.Init.Mode = DMA_CIRCULAR; hdma_dcmi.Init.Priority = DMA_PRIORITY_VERY_HIGH; hdma_dcmi.Init.FIFOMode = DMA_FIFOMODE_DISABLE; hdma_dcmi.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL; hdma_dcmi.Init.MemBurst = DMA_MBURST_SINGLE; hdma_dcmi.Init.PeriphBurst = DMA_PBURST_SINGLE; __HAL_LINKDMA(
Posted on January 30, 2016 at 16:52 Hello Guys, I've currently designed a board with an STM32F756IGT6. Connected to the board is an 7'' LCD from Rocktech. Same manufacturer as the 4.3'' LCD's that can be found on the stm32F7 discovery boards. I'm now trying to get the LCD to work. It's connected with a 18 bit RGB interface and i'm using the Sync connection mode. Not the DE connection. I have the display partially working because I can set background colors successful. Now I was trying to put some pixels in the screen to verify the timing is correct. I adapted the STEMWIN hello world example from the discovery board to my board and tried to show the helllo world. But all I get is some random lines. I think the timing for the back porch etc is not correct. In the datasheet of the LCD I find these parameters: If i'm correct then these should be the settings for the LTDC controller: void MX_LTDC_Init(void) { LTDC_LayerCfgTypeDef pLayerCfg; LTDC_LayerCfgTy
Posted on February 03, 2016 at 17:46Im trying to get image via DCMI, everything works fine, except DCMI frame received interrupt. When im receiving 320x240 rgb565 image, HAL_DCMI_FrameEventCallback is never triggering, so I redefined dma callback with my own function: HAL_DCMI_Start_DMA(&hdcmi, DCMI_MODE_SNAPSHOT, SDRAM_BANK_ADDR, (uint32_t)(IMG_ROWS*IMG_COLUMNS*2/4)); hdcmi.DMA_Handle->XferCpltCallback = DMA_TransferComplete; But it works only for 320x240 (because it less than DMA buffer size 0xFFFF). When Im sending 640x480 image, DMA XferCpltCallback is triggered after the part of the data transfered, not the whole, but HAL_DCMI_FrameEventCallback works as it must. How can I trigger HAL_DCMI_FrameEventCallback with 320x240 image? #discovery #lcd #dcmi #stm32f429
Posted on February 02, 2016 at 16:52 I have an 800x600 pixels RGB565 image stored in the SDRAM of my STM32F7-discovery board starting at memory address 0xC0390000. What I want to do is saving this image to an SD card. The code for this is as follows: FIL file; //file object char file_str[30] = ''imagebmp'' ; //filename DMA2D_HandleTypeDef hdma2d_buf; int32_t i, j; uint32_t tmp = 0; uint16_t img_buf[800]; //buffer for one line UINT bytes_written; FRESULT fs_error; file_str[6] = ( char )((img_counter % 10) + 48); //increase the filename file_str[5] = ( char )(((img_counter/10) % 10) + 48); //create a test pattern, black pixels for (j = 0; j < 640; j++) { if ((j%2) == 0) img_buf[j] = 0x0; else img_buf[j] = 0x0; } fs_error = SD_Mount(); if (fs_error != FR_OK) Filesystem_ErrorHandler(fs_error); fs_error = SD_OpenFile(&file, file_str, F_WR_CLEAR); if (fs_error != FR_OK) Filesystem_ErrorHandler(fs_error); fs_error = f_write(&file, bmp_fileheader800, 70, &bytes_writt
Posted on January 28, 2016 at 18:01Hi,I want to evaluate using STemWin in a new project but for the life of me I can't figure out how to use STM32CubeMX to generate code with STemWin. From what I understand it wasn't included but now it is. The download page says it's now included. I see the libraries in the Middleware folder but no way to enable it in a project.Am I missing something or do I need to import it afterwards in the IDE?One side question. I was going to use the STM32F411RE would it be worth upgrading to STM32F429? I can't seem to find the difference with the 429 vs 439 either.Thanks. #stemwin #stm32cube
Posted on January 25, 2016 at 06:21Hi ,I have configured LTDC pins as follows./* Enable the LTDC and DMA2D clocks */ __LTDC_CLK_ENABLE(); __DMA2D_CLK_ENABLE(); /* Enable GPIOs clock */ LTDC_GPIO_CLK_EN; /*** LTDC Pins configuration ***/ GPIO_Init_Structure.Mode = GPIO_MODE_AF_PP; GPIO_Init_Structure.Pull = GPIO_NOPULL; GPIO_Init_Structure.Speed = GPIO_SPEED_FAST; GPIO_Init_Structure.Alternate = GPIO_AF14_LTDC; GPIO_Init_Structure.Pin = LCD_DATA_PINS_1; HAL_GPIO_Init(LCD_DATA_PORT_1, &GPIO_Init_Structure); GPIO_Init_Structure.Pin = LCD_DATA_PINS_2; HAL_GPIO_Init(LCD_DATA_PORT_2, &GPIO_Init_Structure); GPIO_Init_Structure.Pin = LCD_DATA_PINS_3; HAL_GPIO_Init(LCD_DATA_PORT_3, &GPIO_Init_Structure); GPIO_Init_Structure.Pin = LCD_DATA_PINS_4; HAL_GPIO_Init(LCD_DATA_PORT_4, &GPIO_Init_Structure); GPIO_Init_Structure.Pin  
Posted on January 18, 2016 at 00:37Hellos,I see there is an inbuiltFMC on the STM32F4x9 MCUs which can interface to various memory types including NAND, NOR , SDR SDRAM. My question is: Is it a good idea to use the NOR or a NAND Flash as a FRAME buffer for graphics applications? If yes, which one of the below is a recommended choice for frame buffer to interface with the FMC.1. NAND FLash2.NOR FLash3. SDR-SDRAM4. PSRAM5. 16-bit PC Cards #graphics
Posted on January 08, 2016 at 18:36 Hi there, I'm trying to use the STM32F4 Discovery kit (STM32F4Discovery + BB + CAM [OV9655]; without LCD) to take a 16-bits QVGA (320x240) shot and simply store it in a byte array. Assuming that all DMA and DCMI structures are properly set (which I believe that are; more on that later), a 153600 (320*240*2[=16bits]) byte array is needed, which clearly exceeds the 128K RAM size. With this in mind, and in order to validate my assumptions, I've run a couple of tests using smaller buffer sizes and byte arrays and successfully got partial ''good'' pictures: 320x120 when using a 76800 array and 320x140 with a 89600. As such, what I am now trying (and failing) to do is to use the FLASH memory to allocate the desired 153600 bytes and store the image data into it - although I am now able to r/w from/to the whole array using simple initialization/attribution (e.g.: frame_buffer[0] = 0x10), I can't get the DMA to write to it. Please find the relevan
Posted on January 03, 2016 at 07:37Hello,I'm trying to rotate the display on an STM32F429 Discovery board by 90 degrees clockwise. When I tried to place objects such as text, hline, and vline, the coordinates weren't quite what I expected (in fact, most of the pixels were being placed off the screen). I'm using the driver GUIDRV_LIN_OSY_16. Using this driver, it seems that because the x and y axis are swapped, then mirrored about the y axis, that my problems were being exacerbated. So I took a step back and used GUIDRV_LIN_OS_16 which just swaps the x and y axis. So the problem that I'm having is that the vlines are displayed correctly, but hlines place pixels on several different horizontal lines (as viewed in the new orientation). It's as if the libraries don't know the correct number of pixels in a horizontal scan of the LCD to get to the next pixel in the rotated horizontal line. I'm hoping that this is only because I have someth
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.