Flickering UI

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Flickering UI

      Hi everyone,
      I am working a message composer project, i have use MultiEdit box for the message composing. It works fine in the simulation project. But when i have flashed the program to a target device the multiedit box flicker every time i press a key as i have used gui_exec(); function. If the function is not used, the multiedit box doesn't get updated.

      Please help me out

      Thankyou in advance
    • Hi,

      You should use multi buffering to avoid flickering. Simply call WM_MULTIBUF_Enable() after GUI_Init().

      Please make sure you configured multi buffering properly in your LCDConf.c.

      Multi buffering is only available when using the GUIDRV_Lin driver. When using the GUIDRV_FlexColor driver a driver version with cache has to be used.

      Which driver are you using?
      Which device are you using?

    • Hi,

      With GUIDRV_FlexColor there is no multibuffering available. In this case you have to use a cached version of your driver.

      When setting up the driver you call GUIDRV_FlexColor_SetFunc(). The last parameter defines whether the driver should use a cache or not.

      For example:

      GUIDRV_FLEXCOLOR_M16C1B8 -> with cache

      GUIDRV_FLEXCOLOR_M16C0B8 -> without cache

      When calling WM_MULTIBUF_Enable() the Window Manager makes sure to lock the cache before a drawing operation and to release the cache after the last drawing operation. This way any drawing operation gets performed in the cache. Once finished the cache gets send to the LCD.

      If you are not using the Window Manager you have to lock and unlock the cache manually with LCD_ControlCache() and the proper commands.

      For more information I strongly recommend to take a look into the emWin user manual. The latest emWin user manual can be found here:


    • Thankyou Sven.

      i was using GUIDRV_FLEXCOLOR_M16C0B8 later did change to this GUIDRV_FLEXCOLOR_M16C1B8

      after changing my display is not showing anything.

      I am not able to understand.

      Pls help me out

      Thankyou in advance
      • using GUIDRV_FLEXCOLOR_M16C0B8​.jpeg

        170.94 kB, 1,280×1,168, viewed 241 times
      • using GUIDRV_FLEXCOLOR_M16C1B8​.jpeg

        288.31 kB, 1,280×1,151, viewed 261 times
    • Hi,

      according to your GUIConf.c you have spend emWin only 5K of RAM. With such little memory it is not possible to use a cached version of the driver.

      The cache requires enough memory to hold the entire screen.

      Also memory devices are almost impossible to use.

    • Hi,

      as stated in the manual the GUIDRV_FlexColor driver requires without cache LCD_XSIZE * ((BitsPerPixel + 7) / 8 ) Bytes.
      In your case this means the driver requires 128 * ((16 + 7) / 8 ) = 256 Bytes.

      With cache it requires additional 40KB.

      LCD_XSIZE * LCD_YSIZE * BytesPerPixel --> 128 * 160 * 2 = 40KB.

    • hi Sven,

      Thankyou for the information.

      Please can you lead me to an example for the implementation of the mem devices (to stop flickering). Or provide me with a URL link, where the information is present.

      Kindly requesting.
      thank you

      Shreevatsa YS