STM32H7 GUI_MULTIBUF and screen tearing...

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

    • STM32H7 GUI_MULTIBUF and screen tearing...

      I am seeing a case where GUI_DrawBitmapEx() does not seem to behave properly within
      GUI_MULTIBUF_Begin()/End(), specifically:


      WM_MULTIBUF_Enable(1);
      GUI_MULTIBUF_Begin();
      GUI_DrawBitmapEx(&bmminus1, 285, 300, 0, 0, 300, 300); // Tearing occurs at this line
      GUI_MULTIBUF_End();
      GUI_Exec();

      I would expect to see no change to the display during the Begin()/End().
      When I run or single-step through the DrawBitmap, the screen tears...

      Regards
    • RE: STM32H7 GUI_MULTIBUF and screen tearing...

      Thanks for the reply...

      I tried to disable/enable interrupts and it still tears...

      I was able to fix it by adding the following line during initialization:
      GUI_MULTIBUF_Config(3);


      Although it sure seems like a bug in the emWin code that anything
      within a GUI_MULTIBUF_Begin()/End() shouldn't cause a change on the screen.
    • Hi,

      are you using the sample LCDConf.c provided by STM?

      On the first look it should work.

      C Source Code

      1. GUI_MULTIBUF_Begin();
      2. GUI_DrawBitmapEx(&bmminus1, 285, 300, 0, 0, 300, 300); // Tearing occurs at this line
      3. GUI_MULTIBUF_End();


      With the code above the bitmap should appear after GUI_MULTIBUF_End().

      Where a do you call this code?

      If you call it from within a WM_PAINT case of a window callback there is no need to call any multi buffering API. Just call WM_MULTIBUF_Enable(1) before creating the first window and the window manager will take care about starting and ending (switching back and front buffers) of multi buffering.

      Regards
      Sven
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.