Hello.
I'm testing StemWin5.28
library. I created simple GUI with GUI Builder – window and two
buttons.
My hardware is
STM32F7-discovery. After uploading the project into the kit I see
flickering on the LCD with about 1 second period. After each
flickering I see something resembling my GUI but very distorted.
After about 2 minutes of such behavior the GUI became as it should
be. I increased the STACK from 0x460 to 0x2000 (before this the
situation was even worse).
I attached the the GUI
code and couple of distorted GUI (just to get the idea).
What can I check?
I checked the size of
stack of ST Demo project with more complex graphics and it is only
0x200...
Display All
forum.segger.com/index.php?pag…2e05bdaa3c27f9aa9ca00251b
forum.segger.com/index.php?pag…6e4b604b1c9eaf9e7d8c7ff2a
I changed the code as was suggested in the "Flickering Issue with TEXT_SetText()" thread. The flickering disappeared, but the image became stedily incorrect. Here it is
forum.segger.com/index.php?pag…ccc502ee4da4c0277e7482dc0
The part of the code changed:
I'm testing StemWin5.28
library. I created simple GUI with GUI Builder – window and two
buttons.
My hardware is
STM32F7-discovery. After uploading the project into the kit I see
flickering on the LCD with about 1 second period. After each
flickering I see something resembling my GUI but very distorted.
After about 2 minutes of such behavior the GUI became as it should
be. I increased the STACK from 0x460 to 0x2000 (before this the
situation was even worse).
I attached the the GUI
code and couple of distorted GUI (just to get the idea).
What can I check?
I checked the size of
stack of ST Demo project with more complex graphics and it is only
0x200...
Source Code
- #include "DIALOG.h"
- /*********************************************************************
- *
- * Defines
- *
- **********************************************************************
- */
- #define ID_WINDOW_0 (GUI_ID_USER + 0x00)
- #define ID_BUTTON_0 (GUI_ID_USER + 0x01)
- #define ID_BUTTON_1 (GUI_ID_USER + 0x02)
- // USER START (Optionally insert additional defines)
- // USER END
- /*********************************************************************
- *
- * Static data
- *
- **********************************************************************
- */
- // USER START (Optionally insert additional static data)
- // USER END
- /*********************************************************************
- *
- * _aDialogCreate
- */
- static const GUI_WIDGET_CREATE_INFO _aDialogCreate[] = {
- { WINDOW_CreateIndirect, "Window", ID_WINDOW_0, 0, 0, 480, 272, 0, 0x0, 0 },
- { BUTTON_CreateIndirect, "Button", ID_BUTTON_0, 0, 0, 80, 20, 0, 0x0, 0 },
- { BUTTON_CreateIndirect, "Button", ID_BUTTON_1, 82, 58, 80, 20, 0, 0x0, 0 },
- // USER START (Optionally insert additional widgets)
- // USER END
- };
- /*********************************************************************
- *
- * Static code
- *
- **********************************************************************
- */
- // USER START (Optionally insert additional static code)
- // USER END
- /*********************************************************************
- *
- * _cbDialog
- */
- static void _cbDialog(WM_MESSAGE * pMsg) {
- int NCode;
- int Id;
- // USER START (Optionally insert additional variables)
- // USER END
- switch (pMsg->MsgId) {
- case WM_NOTIFY_PARENT:
- Id = WM_GetId(pMsg->hWinSrc);
- NCode = pMsg->Data.v;
- switch(Id) {
- case ID_BUTTON_0: // Notifications sent by 'Button'
- switch(NCode) {
- case WM_NOTIFICATION_CLICKED:
- // USER START (Optionally insert code for reacting on notification message)
- // USER END
- break;
- case WM_NOTIFICATION_RELEASED:
- // USER START (Optionally insert code for reacting on notification message)
- // USER END
- break;
- // USER START (Optionally insert additional code for further notification handling)
- // USER END
- }
- break;
- case ID_BUTTON_1: // Notifications sent by 'Button'
- switch(NCode) {
- case WM_NOTIFICATION_CLICKED:
- // USER START (Optionally insert code for reacting on notification message)
- // USER END
- break;
- case WM_NOTIFICATION_RELEASED:
- // USER START (Optionally insert code for reacting on notification message)
- // USER END
- break;
- // USER START (Optionally insert additional code for further notification handling)
- // USER END
- }
- break;
- // USER START (Optionally insert additional code for further Ids)
- // USER END
- }
- break;
- // USER START (Optionally insert additional message handling)
- // USER END
- default:
- WM_DefaultProc(pMsg);
- break;
- }
- }
- /*********************************************************************
- *
- * Public code
- *
- **********************************************************************
- */
- /*********************************************************************
- *
- * CreateWindow
- */
- WM_HWIN CreateWindow(void);
- WM_HWIN CreateWindow(void) {
- WM_HWIN hWin;
- hWin = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, 0, 0);
- return hWin;
- }
- // USER START (Optionally insert additional public code)
- // USER END
- /*************************** End of file ****************************/
- /*********************************************************************
- *
- * MainTask
- */
- void MainTask(void) {
- GUI_Init();
- while(1)
- {
- CreateWindow();
- GUI_Delay(500);
- }
- }
forum.segger.com/index.php?pag…2e05bdaa3c27f9aa9ca00251b
forum.segger.com/index.php?pag…6e4b604b1c9eaf9e7d8c7ff2a
I changed the code as was suggested in the "Flickering Issue with TEXT_SetText()" thread. The flickering disappeared, but the image became stedily incorrect. Here it is
forum.segger.com/index.php?pag…ccc502ee4da4c0277e7482dc0
The part of the code changed:
The post was edited 1 time, last by baev_al ().