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
    • 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...
    • 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...