Updating GUI_App.c not working

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

    • Updating GUI_App.c not working

      Hej,

      i´m running stm32f469i-Discovery Board with CubeMX generated code in SW4STM32. When i run the source code below i will just get something like when i execute the code below:
      ----------------------------------
      |Hello world
      |0000
      |
      |
      ---------------------------------

      I don´t see an upcounting number.

      Furthermore it seems like the GUI is not constantly updating which to my understanding should be done via GUI_Delay().

      - What am i missing?
      - Is there something in the settings wrong?
      - How is the Backround accting for updating the display?

      C Source Code

      1. ******************************************************************************
      2. */
      3. #include "GUI_App.h"
      4. #include "GUI.h"
      5. void GRAPHICS_MainTask(void) {
      6. /* USER CODE BEGIN GRAPHICS_MainTask */
      7. /* User can implement his graphic application here */
      8. /* Hello Word example */
      9. GUI_Init();
      10. GUI_Clear();
      11. int i = 0;
      12. /* USER CODE END GRAPHICS_MainTask */
      13. while(1)
      14. {
      15. GUI_DispString("Hello world!");
      16. GUI_DispDecAt( i++, 20,20,4);
      17. if (i > 99) {
      18. i = 0;
      19. }
      20. GUI_Delay(100);
      21. }
      22. }
      23. /*************************** End of file ****************************/
      Display All


      Thank you very mutch in advance...
    • Hi,

      Do you get out of GUI_Delay()?

      I could imagine that the timing related functions are not correctly implemented and GUI_Delay() waits forever.

      Search for GUI_X_Delay() and GUI_X_GetTime(). GUI_X_GetTime() has to return a 1ms tick, either provided by an OS or a HW timer with a period of 1ms. GUI_X_Delay() waits for the given amount of time either by calling an RTOS-delay-function or waiting vor a variable incremented by the 1ms timer.

      Regards,
      Sven
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.
    • Hej,

      yes it is running the loop. When i probe "i" it is counting up.

      I also toggle now an LED on the bord and i see that the code is executed in the speed i want it to.
      So from that perspective i would say that timing in this case is OK.

      Is there something else which could be wrongly configured?
      I realise also, that it seems to just work for a few 50-55 ms. I made two examples which showcase the behaiviour.

      If the GUI_Delay > 50 - 55 ms then it stops working. The second itteration of the while Loop is not working either.

      The results of Code are shown below:


      C Source Code

      1. while(1)
      2. {
      3. GUI_DispString("Hello world!");
      4. GUI_DispDecAt( i++, 20,20,4);
      5. GUI_Delay(60);
      6. HAL_GPIO_TogglePin(GPIOG, GPIO_PIN_6);
      7. if (i > 99) {
      8. i = 0;
      9. }
      10. GUI_DispDecAt( i++, 20,20,4);
      11. GUI_Delay(1000);
      12. }
      Display All
      -------------------------------

      |Hello world
      |0000
      |
      |
      -------------------------------

      C Source Code

      1. while(1)
      2. {
      3. GUI_DispString("Hello world!");
      4. GUI_DispDecAt( i++, 20,20,4);
      5. //GUI_Delay(60);
      6. HAL_GPIO_TogglePin(GPIOG, GPIO_PIN_6);
      7. if (i > 99) {
      8. i = 0;
      9. }
      10. GUI_DispDecAt( i++, 20,20,4);
      11. GUI_Delay(1000);
      12. }
      Display All

      -------------------------------
      |Hello world
      |0001
      |
      |
      -------------------------------


      So it hink that it is some kind of problem with the display communication itself? Or some buffer overrunning? I don´t get any error by the STM32F469i.

      Is there something else i can probe?

      Thank you very mutch in advance...
    • Hi,

      Is GUI_Init() beeing called multiple times?

      You Do this in your appliaction. I know that in some ST examples GUI_Init() is getting called before MainTask().

      Call it just once.

      Regards,
      Sven
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.
    • Hey,

      i tried without calling the GUI_Init() mulltiple times. I didn´t helped. Just to make sure that no hardware configuration problems are present i can tell that i followed these steps to create the source code.

      community.st.com/s/article/FAQ…-using-CubeMX-and-STemWin

      I have no clue what is wrong in my application, because theoreticcly it should work fine. Do you have any other idea, hint or suggestion?

      I´m thankfull for every kind of help.



      Thank you very mutch in advance...
    • I have experiance the same problem. Have you got the solution ?


      Source Code

      1. GUI_Clear();
      2. GUI_SetColor(GUI_WHITE);
      3. GUI_SetFont(&GUI_Font32_1);
      4. GUI_DispStringAt("Hello world!", (LCD_GetXSize()-150)/2,(LCD_GetYSize()-20)/2);
      5. GUI_Delay(25);
      6. GUI_DispStringAt("Bye!", 100, 100);
      I these code If i increase delay from 25 to 30, "Bye" string will not display.
      Something is not good with timing parameter.
      I am using FreeRtos within. GUI_X_Delay() uses osDelay() for timing.
    • Hello, keyurthumar.
      Try to add GUI_Exec() call after GUI_DispStringAt("Bye!", 100, 100);
      Will it do the job??

      C Source Code

      1. GUI_Clear();
      2. GUI_SetColor(GUI_WHITE);
      3. GUI_SetFont(&GUI_Font32_1);
      4. GUI_DispStringAt("Hello world!", (LCD_GetXSize()-150)/2,(LCD_GetYSize()-20)/2);
      5. GUI_Delay(30);
      6. GUI_DispStringAt("Bye!", 100, 100);
      7. GUI_Exec();
    • If you have the EmWin source code try it. Try the assembler otherwise. The goal is to find out the program flow differences in good working case with 25 ms and bad case with 30 ms. Dig into the GUI_DispStringAt function.
      Maybe, this is a matter of LCD emWin driver, I use GUIDRV_LIN_16 with GUICC_M565 color conversion - your code works like a charm. 25, 35, 600 ms

      The post was edited 1 time, last by warlord ().

    • Hello Guys
      Are you able to solve this problem.
      I am also facing a similar problem whenever I am using GUI_Delay, all emWin API used after that doesn't work.
      GUI_Delay is not blocking, it giving proper delay, I also tried with GUI_X_Delay, it works but only for limited times.
      I also tried GUI_Exec(), it works only one time.
      I am using the STemWin_HelloWorld example, from CubeF7 MCU Package, since we are using STemWin we can't debug the source to find the issue.
      More details here
      Unable to Display Text After using GUI_Delay Function