Skip to main content
melt brink
Associate III
May 17, 2018
Question

STM32f746G Discovery .IOC loaded from CUBEMX with STemwin LCD display

  • May 17, 2018
  • 16 replies
  • 3465 views
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
This topic has been closed for replies.

16 replies

ST Technical Moderator
May 17, 2018
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.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
melt brink
Associate III
May 17, 2018
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
Nawres GHARBI
ST Technical Moderator
May 21, 2018
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
May 21, 2018
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
May 21, 2018
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

Nawres GHARBI
ST Technical Moderator
May 29, 2018
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
May 29, 2018
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;

}

}
melt brink
Associate III
June 14, 2018
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
ZMohd.7
Associate III
October 25, 2018

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!!

melt brink
Associate III
October 26, 2018

Please find file attached

melt brink
Associate III
October 28, 2018

Hi Zafar

Are you using Stemwin? if you are then Stemwin will include the the touch functions. Remember to run Stemwin from within cubemx and make you GUI.

ZMohd.7
Associate III
October 28, 2018

Hi Melt.

Thank You for your valuable replay!!

I will check it. :)

Regards,

Zafar

ST Technical Moderator
October 29, 2018

Hello @ZMohd.7​ ,

I invite you to follow this FAQ: Enable touch screen on the STM32F746G-Discovery

https://community.st.com/s/article/FAQ-Enable-touch-screen-on-the-STM32F746G-Discovery

Kind Regards,

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
ZMohd.7
Associate III
February 24, 2019

Dear @Imen DAHMEN​ 

I followed the provided link and it's perfectly fine for me display with touch.

This time I am trying to build basic graphics display program using Internal SRAM of STM32F746 discovery board, I am able to swap the graphics buffer memory location from SDRAM to SRAM provided example code.

But when i am generate a code using CUBEMX with STemWin and in FMC option select LCD Interface in memory type, code is build but unfortunately it's not working or display blank.

[ .ioc file are attached for your reference.] 

Thanks in Advance.

Regards,

zaf

TKula
Associate
March 1, 2019

Hi all.

If take the 4.26 project and open in truestudio the touch works. But if i tskr the 4.26 into CubeMX and migrate to latest CubeF7 touch doesn't work. Any ideas why?​