Hello,
I am using STemwin but there is nobody in st forum to solve my problem.
I can init LCD; i can write anything on the screen using GUI_DispString(). I can create button (or checkbox, or some widgets) on anywhere on the screen, but when i try to write anything on the widget (for example BUTTON_SetText(), or for example CHECKBOX_SetText() ), after GUI_Exec() a hard fault occured. I download a lot of example, and i did what they did but the result didnt changed.
What do you thing about the reason?
NOTE:
- LCD driver is RA8875
- MCU is STM32F427VI (256KByte RAM, 2MByte Flash)
- FMC is using for communication.
- External memory device is not using.There is a code which wrote for testing.- Allocated 192KByte ram for emWin.
- LCD size is normall 800*480 but i tried to make this 150*150.
Display All
I am using STemwin but there is nobody in st forum to solve my problem.
I can init LCD; i can write anything on the screen using GUI_DispString(). I can create button (or checkbox, or some widgets) on anywhere on the screen, but when i try to write anything on the widget (for example BUTTON_SetText(), or for example CHECKBOX_SetText() ), after GUI_Exec() a hard fault occured. I download a lot of example, and i did what they did but the result didnt changed.
What do you thing about the reason?
NOTE:
- LCD driver is RA8875
- MCU is STM32F427VI (256KByte RAM, 2MByte Flash)
- FMC is using for communication.
- External memory device is not using.There is a code which wrote for testing.- Allocated 192KByte ram for emWin.
- LCD size is normall 800*480 but i tried to make this 150*150.
C Source Code
- static void _DemoButton(void) {
- BUTTON_Handle hButton;
- GUI_SetFont(&GUI_Font8x16);
- GUI_DispStringHCenterAt("Click on button...", 160, 90);
- //
- // Create the button and set text
- //
- hButton = BUTTON_CreateEx(110, 110, 100, 40, 0, WM_CF_SHOW,0,1);
- BUTTON_SetText(hButton, "Click me..."); //When i remove this line, everything is ok, but when i wrote this line after GUI_Exec() hard fault occured.
- }
- void EMain(void){
- GUI_Init();
- GUI_SetBkColor(GUI_RED);
- GUI_Clear();
- GUI_SetFont(&GUI_Font8x16);
- _DemoButton();
- GUI_Exec();
- while(1){
- }
- }
The post was edited 4 times, last by ertana ().