Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 21, 2024, 04:55:57 16:55


Login with username, password and session length


Pages: [1]
Print
Author Topic: Anyone used STemWin with some ST Development Board  (Read 3529 times)
0 Members and 1 Guest are viewing this topic.
xpress_embedo
Active Member
***
Offline Offline

Posts: 173

Thank You
-Given: 122
-Receive: 254


« on: January 08, 2022, 06:58:02 18:58 »

Hi Everyone,
I am trying to get started with STemWin using STM32F769I-DISCO board.
Usually, the Cube Framework provided by ST should work out of the box, but in my case, I started with a simple "STemWin_HelloWorld" example, and whatever is written in it works.
The STemWin_HelloWorld example is as below.
Code:
void MainTask(void) {
  GUI_Clear();
  GUI_SetFont(&GUI_Font32_1);
  GUI_DispStringAt("Hello world!", (LCD_GetXSize()-100)/2, (LCD_GetYSize()-20)/2); 
  while(1);
}

What I did, I just added another string to display and a 1sec delay (I have started learning so for me this is a hello world program)

Code:
void MainTask(void) {
  GUI_Clear();
  GUI_SetFont(&GUI_Font32_1);
  GUI_DispString("Hello World from STM32F7\r\n");
  GUI_Delay(1000);
  GUI_DispStringAt("Hello world!", (LCD_GetXSize()-100)/2, (LCD_GetYSize()-20)/2); 
  while(1);
}

As Can be seen above I just updated my program with a display string function followed by a GUI_Delay function.
But my second text of "Hello World" is not displayed on the screen, while GUI_Delay function is not blocking the control flow, because in debugging session I reached the while loop.

If I remove the GUI_Delay function, I can see both strings on the LCD screen.
Another strange thing is I can't single-step debug my project, If I do so I can't see anything on LCD display.
What I understood is that GUI_Delay function is made up of some delay and GUI_Exec function, even I tried to use the function GUI_X_Delay followed by GUI_Exec, but this also works only time.

So at the moment I have two problems.
* I can't single-step debug my project, technically I can, but then I don't see anything on display.
* GUI_Delay, GUI_Exec functions are not working, or I can say that emWin APIs stopped working after using these functions.

If someone has faced a similar problem or has some idea about this, please let me know..
This example is directly from the CubeF7 example without any modification, the only modification I have done is the one which I mentioned above.
Thanks in advance.
Logged
schisanoa
Newbie
*
Offline Offline

Posts: 10

Thank You
-Given: 3
-Receive: 5


« Reply #1 on: May 12, 2022, 02:46:20 14:46 »

Worked a lot with Cube from ST and I hate it.

First of all, some question:
How did you started? Are you working with the last example?
How did you loaded the project? The source files are linked or are inside your project workspace?

Try to put a GUI_Exec/gui_delay inside the while loop, by the way this is the wrong approach. The gui_exec function call the callback function of the main screen, you should make your operation in graphic inside the WM_PAINT event, try to download the example and hello world from segger emwin web page, they are more accurate, and help to understand how the GUI works.
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC