Wednesday, April 25th 2018, 10:23pm 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.

nikhil

Beginner

Date of registration: Nov 10th 2017

Posts: 2

1

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));


main
{
//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 ???????


Thanks

Nikhil

SEGGER - Schoenen

Super Moderator

Date of registration: Aug 13th 2015

Posts: 562

2

Friday, November 10th 2017, 11:22am

Hi,

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:

GUIDRV_FlexColor_SetFunc(pDevice, &PortAPI, GUIDRV_FLEXCOLOR_F66709, GUIDRV_FLEXCOLOR_M16C1B8);

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().

Regards
Sven
SEGGER - Schoenen has attached the following file:
  • RefreshHook.zip (672 Byte - 50 times downloaded - Last download: Apr 21st 2018, 10:31pm)

nikhil

Beginner

Date of registration: Nov 10th 2017

Posts: 2

3

Friday, November 10th 2017, 1:59pm

Hi,

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.


Regards
Nikhil Raj.