Saturday, February 24th 2018, 5:04am UTC+1

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.

Serge

Beginner

Date of registration: Aug 13th 2013

Posts: 14

1

Friday, August 16th 2013, 4:41pm

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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
int main(void)
{
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4);
BSP_Init();
WM_SetCreateFlags(WM_CF_MEMDEV);
GUI_Init();

WM_HWIN hText_X;
hText_X = TEXT_CreateEx(0, 0, 320, 30, WM_HBKWIN, WM_CF_SHOW, 0, GUI_ID_TEXT0, "TEXT_AAAA");
TEXT_SetFont(hText_X, &GUI_Font24B_ASCII);
TEXT_SetTextAlign(hText_X, GUI_TA_HCENTER | GUI_TA_VCENTER);
TEXT_SetTextColor(hText_X, GUI_YELLOW);

while (1) { GUI_Delay(50); }
}

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
Serge has attached the following images:
  • withMEMDEV.jpg
  • noMEMDEV.jpg

This post has been edited 2 times, last edit by "Serge" (Aug 16th 2013, 5:50pm)


Date of registration: May 26th 2009

Posts: 1,022

2

Monday, August 19th 2013, 9:47am

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

Serge

Beginner

Date of registration: Aug 13th 2013

Posts: 14

3

Monday, August 26th 2013, 4:17pm

Solved

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