If we create a graphics window for GRAPHICS configuration with GUIBuilder for file GUI_App.c
CreateWindow();
The CubeMX is creates function in file STemwin_wrapper.c
void GRAPHICS_Init(void)
{
/* Initialize the GUI */
GUI_Init();
//WM_MULTIBUF_Enable(1);
/* Enable the multi-buffering functionality */
/* Activate the use of memory device feature */
/* USER CODE BEGIN WM_SetCreateFlags */
//WM_SetCreateFlags(WM_CF_MEMDEV);
/* USER CODE END WM_SetCreateFlags */
}
If you delete comments
WM_MULTIBUF_Enable(1);
/* Enable the multi-buffering functionality */
/* Activate the use of memory device feature */
/* USER CODE BEGIN WM_SetCreateFlags */
WM_SetCreateFlags(WM_CF_MEMDEV);
after this, the graphical interface stops running !!!
(Attention! After deleting comments and compiling, turn off and turn on the power)
The problem is solved by adding a line
WM_MULTIBUF_Enable(1);
/* Enable the multi-buffering functionality */
/* Activate the use of memory device feature */
/* USER CODE BEGIN WM_SetCreateFlags */
HAL_LTDC_ProgramLineEvent(&hltdc, 0); //!!!!!!!!!!!!!!!!!!!!!!!
WM_SetCreateFlags(WM_CF_MEMDEV);
/* USER CODE END WM_SetCreateFlags */
And everything works fine!
P.S.
If FREERTOS is used, it is necessary to eliminate one more bug
in file ..........STemWin\Target\STemwin_wrapper.c comment
line (85):
//extern volatile GUI_TIMER_TIME OS_TimeMS;
line (876) :
// OS_TimeMS++;
CreateWindow();
The CubeMX is creates function in file STemwin_wrapper.c
void GRAPHICS_Init(void)
{
/* Initialize the GUI */
GUI_Init();
//WM_MULTIBUF_Enable(1);
/* Enable the multi-buffering functionality */
/* Activate the use of memory device feature */
/* USER CODE BEGIN WM_SetCreateFlags */
//WM_SetCreateFlags(WM_CF_MEMDEV);
/* USER CODE END WM_SetCreateFlags */
}
If you delete comments
WM_MULTIBUF_Enable(1);
/* Enable the multi-buffering functionality */
/* Activate the use of memory device feature */
/* USER CODE BEGIN WM_SetCreateFlags */
WM_SetCreateFlags(WM_CF_MEMDEV);
after this, the graphical interface stops running !!!
(Attention! After deleting comments and compiling, turn off and turn on the power)
The problem is solved by adding a line
WM_MULTIBUF_Enable(1);
/* Enable the multi-buffering functionality */
/* Activate the use of memory device feature */
/* USER CODE BEGIN WM_SetCreateFlags */
HAL_LTDC_ProgramLineEvent(&hltdc, 0); //!!!!!!!!!!!!!!!!!!!!!!!
WM_SetCreateFlags(WM_CF_MEMDEV);
/* USER CODE END WM_SetCreateFlags */
And everything works fine!
P.S.
If FREERTOS is used, it is necessary to eliminate one more bug
in file ..........STemWin\Target\STemwin_wrapper.c comment
line (85):
//extern volatile GUI_TIMER_TIME OS_TimeMS;
line (876) :
// OS_TimeMS++;
As reported by Stanford Medical, It's indeed the ONLY reason this country's women get to live 10 years longer and weigh an average of 42 pounds lighter than we do.
ОтветитьУдалить(And actually, it has absolutely NOTHING to do with genetics or some secret-exercise and EVERYTHING about "HOW" they eat.)
BTW, What I said is "HOW", not "WHAT"...
Tap this link to reveal if this little questionnaire can help you release your real weight loss potential