AnsweredAssumed Answered

CubeMX 4.25 & 4.26 GRAPHICS configuration MULTIBUF bug

Question asked by Vitaliy Chernobay on Jun 12, 2018

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

that I described before

CubeMX 4.25 + STemWin + FREERTOS = bug 

 

in file  ..........STemWin\Target\STemwin_wrapper.c   comment

line (85):

//extern volatile GUI_TIMER_TIME OS_TimeMS;

line (876) :

//   OS_TimeMS++;

Outcomes