cancel
Showing results for 
Search instead for 
Did you mean: 

STemWin on eval board problem

sfzap
Associate II
Posted on August 16, 2013 at 17:23

Hi there, I am new to STemWin, 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. Background window created and displayed, has only one element, text. Code:

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. What is wrong?

Sincerely

Serge

#memdev-strange-behaviour
4 REPLIES 4
aizhixi
Associate II
Posted on August 23, 2013 at 08:41

i also have the same the question .

i don't know about.

sfzap
Associate II
Posted on August 26, 2013 at 16:24

I found where problem was: my poor knowledge of emWin. 0690X000006050UQAQ.png

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.

Serge

jj2
Associate II
Posted on August 27, 2013 at 02:02

Hello Serge,

What a nice gesture on your part - surely helpful - much appreciated and thank you.

1600 pgs of docs/specs - and you read ''several times!''   (assume your frayed copy of ''War & Peace'' - unfindable/unavailable...) 

Vendor's site (emWin) may also guide, explain - don't believe too many here have had time to fully understand/master.

Thanks again...

sfzap
Associate II
Posted on August 27, 2013 at 16:14

Hi Sprague, sorry there is only 1080 pages.

''War & Peace'' I read completely just once, but enjoyed it in it original language.

Vendor of emWin (Segger) would not provide much support, because Segger was paid by ST, not by end-users.

Would be nice if ST will dedicate some person to learn/support STemWin deeper, because this GUI is really, really nice, working product, with smallest RAM/ROM footprint of such quality/features of graphics.

I believe it will be used more and more by ST community in future. Thanks a lot, you bought that for us!

Serge