MEMDEV strange behaviour

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

  • MEMDEV strange behaviour

    Hi there, I am new to emWin, have a question about using Memory devices. I observe some strange behaviour of window appearance using memdev and reproduced it in short piece of code,
    could you please explain, may be I just don't understand something. Background window created and displayed, has only one element, text. Code:

    Source Code

    1. int main(void)
    2. {
    3. NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4);
    4. BSP_Init();
    5. WM_SetCreateFlags(WM_CF_MEMDEV);
    6. GUI_Init();
    7. WM_HWIN hText_X;
    8. hText_X = TEXT_CreateEx(0, 0, 320, 30, WM_HBKWIN, WM_CF_SHOW, 0, GUI_ID_TEXT0, "TEXT_AAAA");
    9. TEXT_SetFont(hText_X, &GUI_Font24B_ASCII);
    10. TEXT_SetTextAlign(hText_X, GUI_TA_HCENTER | GUI_TA_VCENTER);
    11. TEXT_SetTextColor(hText_X, GUI_YELLOW);
    12. while (1) { GUI_Delay(50); }
    13. }
    Display All

    Result: triple corrupted image of desired text. Please see picture.
    When background window created and displayed NOT using memdev (line WM_SetCreateFlags(WM_CF_MEMDEV); removed) text displayed correctly. Please see picture.
    (text color, size and alignment does not change anything). Same story with pictures. I use STM324xG-EVAL board, but tried on few STM32F40x MC, same story. I am using emWin 5.0
    I use precompiled emWin package from ST, no RTOS. Is it a bug in just provided compiled library (.a)? or native emWin behaive same way?
    What could be wrong?
    Sincerely
    Serge
    Images
    • withMEMDEV.jpg

      319.85 kB, 1,280×1,024, viewed 809 times
    • noMEMDEV.jpg

      314.78 kB, 1,280×1,024, viewed 1,005 times

    The post was edited 2 times, last by Serge ().

  • Hello Serge,

    I am afraid I am not able to reproduce the problem. Please understand, that I have to ask you to direct your support question directly to the binary library supplier. We have an agreement with them, that includes their right to provide our emWin software as library and their obligation to support their customers. They have not paid us to support their customers. However we can offer a support contract or the sources of our software which entitles you to receive direct support from SEGGER. Is this of interest for you?

    Best regards,
    Adrian
  • Hi Adrian, thanks for fast response.
    I found where problem was: my poor knowledge of emWin. :whistling:
    After I read few more times all 1600 pages of specs I figured out problem was in redrawing of background screen, which automatically created and exist always.
    So adding functions (right after GUI_Init)
    WM_SelectWindow(WM_HBKWIN);
    WM_SetDesktopColor(GUI_BLACK);
    started automatically redraw background window in black and solved this problem.
    Thank you
    Serge