cancel
Showing results for 
Search instead for 
Did you mean: 

STM32f746G Discovery .IOC loaded from CUBEMX with STemwin LCD display

melt brink
Associate III
Posted on May 17, 2018 at 16:02

Goodday. 

Loading the default values in STM32f746 disco on STCubeMx, and performing following checks :

1. Graphics ticked, STEmwin enabled, Guibuilder enabled

2. Corrected the pixel resolutuon 480x272

3. Execute Guibuilder from within StCube

4. As per STcube manual (UM1718) check CRS, DMA2D, FMC,SDRAM,RCC,LTDC and DSI (all standard activated when loading the 746 Disco default  .IOC profile.

I am still not getting any display for some reason. I have tried to disable RTOS as well as any other peripherals in the default  setup that isnot required with no luck. I suspect a clock setup or something that has not been ticked.

Anyone perhaps have a working .IOC 32f746 Disco setup with working StemWin and  Guibuilder for me to compare to?

thanks a mil

#stcubemx #mbedtls-stm32f746g-discovery #stemwin #stemwin-guibuilder
16 REPLIES 16
Imen.D
ST Employee
Posted on May 17, 2018 at 16:16

Hello,

Which CubeMx and Cube firmware package versions used ?

Be sure to use the latest version and check that GUI_Init is called before any STemWin function is used.

I recommend you to share your ioc file to check your problem.

Best Regards

Imen.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
melt brink
Associate III
Posted on May 17, 2018 at 16:32

attcahed is my .IOC file after I have disabled just about everything. All I require is USART 6.

Im using cube 4.1

with latest f7 firmware 1.0

________________

Attachments :

WaiterGui_cube_disco7.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxcJ&d=%2Fa%2F0X0000000b0E%2FIZ5L8xVsidwLMcvHcOBNvsmw6BgGc1b6LCtLJH1LEnI&asPdf=false
melt brink
Associate III
Posted on May 21, 2018 at 14:18

*/

#include 'GUI_App.h'

#include 'GUI.h'

#include 'DIALOG.h'

extern WM_HWIN CreateWindow(void);

void GRAPHICS_MainTask(void) {

/* 2- Create a Window using GUIBuilder */

// CreateWindow();

/* USER CODE BEGIN GRAPHICS_MainTask */

/* User can implement his graphic application here */

/* Hello Word example */

GUI_Clear();

GUI_SetColor(GUI_GREEN);

GUI_SetFont(&GUI_Font32_1);

GUI_DispStringAt('Hxcvdgdg!', (LCD_GetXSize()-150)/2, (LCD_GetYSize()-20)/2);

// GUI_Delay(5000);

GUI_DrawGradientRoundedV(100, 100, 140, 140, 10, GUI_LIGHTGRAY, GUI_GRAY);

GUI_Delay(5000);

GUI_SetColor(GUI_WHITE);

/* USER CODE END GRAPHICS_MainTask */

while(1)

{

GUI_Delay(100);

}

}

/*************************** End of file ****************************/

I have made some progress and can now print and draw to the stm32f746 using the code attached. My Guibuilder code

is not working as soon as I call Createwindow(); I get a blank screen.GUI_Aoo.c code attached.

For the Guibuilder to work do I need to include additional files besides the ones generated by .IOC?

my NEW IOC attatched.

________________

Attachments :

STM32F746_Discovery_Board.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxaN&d=%2Fa%2F0X0000000b02%2FKSFH0n._gBR_AX_1XgmmRA_6pr28N_Q..maSdcjATrs&asPdf=false
melt brink
Associate III
Posted on May 21, 2018 at 16:17

Thanks Imen. I have tried your IOC file and seem to have the same problem. I can write and draw on the LCD but the minute I run 

CreateWindow();, the display flashes some pixels and goes black.

I suspect it could be an include file im missing from STemwin

Posted on May 21, 2018 at 15:08

Hi Melt,

This is a pre-configured ioc, it may help you

________________

Attachments :

STM32F746_Discovery_Board.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxXA&d=%2Fa%2F0X0000000b05%2FSIvJk6Il4Fs55rAg5CuZwzZU5ZwJkIjR7NnkYgLujYs&asPdf=false
melt brink
Associate III
Posted on May 29, 2018 at 17:37

Thanks for the suggestion Nawres, I dontt seem to have  this case 

WM_INIT_DIALOG:

static void _cbDialog(WM_MESSAGE * pMsg) {

int NCode;

int Id;

// USER START (Optionally insert additional variables)

// USER END

switch (pMsg->MsgId) {

case WM_NOTIFY_PARENT:

Id = WM_GetId(pMsg->hWinSrc);

NCode = pMsg->Data.v;

switch(Id) {

case ID_BUTTON_0: // Notifications sent by 'Button'

switch(NCode) {

case WM_NOTIFICATION_CLICKED:

// USER START (Optionally insert code for reacting on notification message)

// USER END

break;

case WM_NOTIFICATION_RELEASED:

// USER START (Optionally insert code for reacting on notification message)

// USER END

break;

// USER START (Optionally insert additional code for further notification handling)

// USER END

}

break;

// USER START (Optionally insert additional code for further Ids)

// USER END

}

break;

// USER START (Optionally insert additional message handling)

// USER END

default:

WM_DefaultProc(pMsg);

break;

}

}
Posted on May 29, 2018 at 16:00

Hi melt, 

In your DLG file go to 'static void _cbDialog' 

then case WM_INIT_DIALOG: and at the end of this case in the user tag put WM_Paint(pMsg->hWin);

melt brink
Associate III
Posted on June 14, 2018 at 12:30

From ST I have received a working IOC file with just graphics, UART, TIM3. Thanks to ST guys. Touch not support in Cubemx s yet. I am now trying to include touch but will start a new thread.

________________

Attachments :

STM32F746-Disco_CubeMX_4.26.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxV3&d=%2Fa%2F0X0000000ayr%2FBWeO0U4VAc77WTeImKnaZWhqBUK30zvK_qGMD9tf8h0&asPdf=false

Hi Melt,

Hope you are doing well.

Can you share me that IOC file, provided by ST employee, because I'm here working on STM32F7 Discovery(MB1191B) board and facing same problem LCD not bring up when generating C code using STM32CubeMX.

Thanks in Advanced!!