Associate
August 16, 2013
Question
STemWin on eval board problem
- August 16, 2013
- 4 replies
- 1636 views
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