Friday, April 20th 2018, 4:54am UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.



Date of registration: Nov 10th 2017

Posts: 2


Friday, November 10th 2017, 9:51am

Setting call back for emwin function GUI_SetRefreshHook() function

Hi am trying to set call back for the emwin GUI_SetRefreshHook function but call back is not happening ? why? My implementation has given follows

void callbacknon_displayperiod (void);
extern void GUI_SetRefreshHook(void (* callbacknon_displayperiod)(void));

//GUI init and emwing initializations


void callbacknon_displayperiod ( )

int test;

test =0;


I put break point on the call back function " void callbacknon_displayperiod ( )" but it not happening why ???????



SEGGER - Schoenen

Super Moderator

Date of registration: Aug 13th 2015

Posts: 561


Friday, November 10th 2017, 11:22am


This function gets only called when using a cached version of an indirect display driver.
It won't be called when using GUIDRV_Lin.

The most common indirect display driver is most likely the GUIDRV_FlexColor driver.

To get this function called you have to choose the cached version of the driver, for example:


The red one stands for cache enabled.

If you are using GUIDRV_Lin you should use the multi buffering API.

Which driver are you using?

Attached is an example on how you can use the function GUI_SetRefreshHook().

SEGGER - Schoenen has attached the following file:
  • (672 Byte - 47 times downloaded - Last download: Yesterday, 1:43pm)



Date of registration: Nov 10th 2017

Posts: 2


Friday, November 10th 2017, 1:59pm


Thank you for the immediate response.

The driver we are using is GUIDRV_Lin. In our project we are using EmWin with STM32F429 processor. Our application is using LTDC driver of STM processor with virtual screen support. We are not using multi buffering since we understand that it should not be used along with Virtual Screen.

Our Issue is when our TFT display refresh is 32 MHz and our virtual screen is in external SDRAM. When trying to load screen to TFT display we finding the images are shivering vertically. But when the TFT display refresh rate is 24 MHz, the display is stable but we are facing flicker issue because of lower refresh rate.

Could please provide a solution for this situation.

Nikhil Raj.