Unable to Display Text After using GUI_Delay Function

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Unable to Display Text After using GUI_Delay Function

      Hello Everyone,
      Few days back I have started to learn the emWin Library and initially started with the simulation examples provided, and they works fine.
      As a next step for real learning, I decided to learn emWin Library on a real development board, I choose STM32F769I-DISCO board, reason is that they free version on emWin to be used with their products, known as STemWin.

      I started with the HelloWorld example available in MCUCubeF7 package provided by ST, the name of the example is STemWin_HelloWorld, which works fine, but when I tried to perform Single Step Debugging I can't see anything printed on the screen.

      C Source Code

      1. void MainTask(void) {
      2. GUI_Clear();
      3. GUI_SetFont(&GUI_Font32_1);
      4. GUI_DispStringAt("Hello world!", (LCD_GetXSize()-100)/2, (LCD_GetYSize()-20)/2);
      5. while(1);
      6. }
      After this, I added another string to get displayed on this with some delay, and the code is now like this.

      C Source Code

      1. void MainTask(void) {
      2. GUI_Clear();
      3. GUI_SetFont(&GUI_Font32_1);
      4. GUI_DispString("Hello World from STM32F7\r\n");
      5. GUI_Delay(1000);
      6. GUI_DispStringAt("Hello world!", (LCD_GetXSize()-100)/2, (LCD_GetYSize()-20)/2);
      7. while(1);
      8. }

      And when I run this example, I just see "Hello World from STM32F7" on the screen and not the "Hello World" in the middle of the screen.
      I cross-checked and found that the GUI_Delay function works well, there is no issue with that, the problem is that "GUI_DispStringAt" function is not working after GUI_Delay function, if I remove GUI_Delay function completely it works fine.
      As can be seen in the below image, after using GUI_Delay, I can't see "Hello World" on the display.
      forum.segger.com/index.php/Attachment/4996-emWinIssue-png/

      And as be seen from this image GUI_Delay is not blocking because the control reaches the while(1) loop.
      forum.segger.com/index.php/Attachment/4997-STemWinIssue-PNG/

      Since STemWin is a library form of emWin, I need the suggestions from the experts to find the root cause of this behavior and how to fix it.
      Images
      • emWinIssue.png

        779.45 kB, 1,461×767, viewed 578 times
      • STemWinIssue.PNG

        61.44 kB, 1,133×705, viewed 519 times