Skip to main content
Cevdet
Associate III
April 23, 2018
Question

STM32CubeMX & STemWin

  • April 23, 2018
  • 7 replies
  • 2953 views
Posted on April 23, 2018 at 20:45

Hi 

I am trying to create an interface with STemWin using cubeMX.

I did everthing in [

STM32CubeMX for STM32 configuration

and initialization C code generation (UM1718 User manual)].

[You can reach this file cubeMX app->Display the Help]

I have activated CRC,DMA2D,FMC,LTDC,RCC; have created an interdafe using STemWin; have generated code (EWARM) and all I had is a wide clear-white screen-nothing.

I was expecting to see the interface that I make in STemWin.

What am I suppose to do create an interface with STemWin using cubeMX app?

The devcie I use is STM32F746G-DISCO

Thank you for your help

Best Regards

#stemwin #stm32f746g #cubemx
This topic has been closed for replies.

7 replies

world04
Visitor II
April 24, 2018
Posted on April 24, 2018 at 09:33

I would just compare the  build sourcecode with an existend example that st distributes. Generaly, it's hard to say why your code does'nt work, without a further observation. I had done the expression that CubeMX does generate just a framework, if cubeMX is configured right. Even that's a code generator, a deeper knowledge of the mpu and their peripheral extensions are required.

I have never used a cubeMX Framework for my projects, but sometimes it saves time to setup the timing values and the supported peripherie.

It does not generate an example or fillup the init of external and unknown devices.
Nawres GHARBI
Technical Moderator
April 30, 2018
Posted on April 30, 2018 at 12:41

Hi

cevdetbas29

Could you please send me your project (*.ioc) I will try to help

Cevdet
CevdetAuthor
Associate III
May 2, 2018
Posted on May 02, 2018 at 10:03

Hi

Let me tell you what I did and what ı want to do:

https://www.youtube.com/watch?v=lbca4T4oXWk

Like at this video I am trying to read ADC value and see it in Graph and Progbar widgets. And also as a text.

In the project I have activated the;

CRC

DMA2D

LTDC(RGB888)

FMC.SDRAM1 and parameters are;

  • sdck0+sdne0
  • 2banks
  • 11 bits
  • 16 bits
  • 16-bit byte enable

to activate Grpahics.STemWin at Configuration tab.

I have prepared the interface with emWin.

Genertated EWARM codes and all I had is an empty white screen. Not my interface I prepared with emWin.

I attach my .ioc file.

[BTW I can't attach file while replying..I attach it while I edit my reply. So your attachment system does't work.]

Thank you for interest..

________________

Attachments :

STemWin&CUBE.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hxf8&d=%2Fa%2F0X0000000b0i%2FHroYSYWeJ7hqdxicu9CEiynoTleoP3eTx0UyQlpcYXw&asPdf=false
Nawres GHARBI
Technical Moderator
May 10, 2018
Posted on May 10, 2018 at 14:40

Please find a pre-configured ioc

Hope that helps

________________

Attachments :

STM32F746_Discovery_Board.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hxdv&d=%2Fa%2F0X0000000b0R%2FBTW5GiSFh8sQH_Op4hj12h7KbauLGoos063ShCSbyd0&asPdf=false
Duy Tran
Associate III
May 19, 2018
Posted on May 19, 2018 at 18:48

Hi

GHARBI.Nawres

‌,

I used your pre-configured ios with my F746 Discovery and I used IAR as my IDE but it is still not working (the screen is all white). I am using the 1.11 SDK version.

Thank you very much

Nawres GHARBI
Technical Moderator
May 21, 2018
Posted on May 21, 2018 at 09:01

Hi Duy, 

Did you add something to display with the GUI builder

world04
Visitor II
May 21, 2018
Posted on May 21, 2018 at 14:05

At first, if you wanna use the GUI Builder, it's required to bind the guilib in your project.

Second, you need to include the prototype search  path of the guilib in your project.

third - you need to define a display init sequence and init them. This special special job is done by the HAL.

If the GuiLib is used, you need to enable the CRC lib from hal and init them before the guilib is initialized !!!

You need to decide what kind of system you are wanna use - superloop or RTOS. This is important for the event / message handler, that need to be called in the background. In an RTOS this will be done by teh default task - in an superloop this could be done by a timer irq or you call them every loop passing. This job updates the screen and handle the events and messages of the GUI.

The rest is similar like windows. You need to define a windows resource and a callback. This job will be done by the GUIBuilder.

I would recomment using an RTOS to handle all the jobs. That's very easy and you have more control of the timing.

I assume the programm should do more as handle the GUI. This gives you more flexibility.

An example of a superloop is available in the example of the 746 Disco HAL.

If you wanna have an example of RTOS usage with the GUI, send me a message and i will send you project of my first simple projects. This show you everything you need to know. 

I use atollic and the project is available in keil too. The keil is less komplex becaute the most jobs that have to be done is hidden by keils IDE library package scheme.

Beware, the projects are bigger so you need a bigger email account.  

Duy Tran
Associate III
May 21, 2018
Posted on May 21, 2018 at 16:47

Hi

Kaltofen.Jupp

‌,

Thank you for your reply, can you send me some example project of yours? I can't find any instruction or document about STemWin configuration...

Best regards,

Vitaliy Chernobay
Senior
May 25, 2018
Posted on May 25, 2018 at 22:14

my working project with STemWin (From CubeMX 4.25) for 746Discovewery

________________

Attachments :

746.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxYR&d=%2Fa%2F0X0000000azp%2FfttwLn3p.bSRjoyGTDwTAL3EosCpBhcKB6VnStEj_NM&asPdf=false
Duy Tran
Associate III
May 26, 2018
Posted on May 26, 2018 at 16:00

Thank you so much Vitaliy.

I will try to understand. 

Once again, thanks

Vitaliy Chernobay
Senior
June 13, 2018
Posted on June 13, 2018 at 21:16

https://community.st.com/0D50X00009XkXi3SAF

Cevdet
CevdetAuthor
Associate III
September 4, 2018

Hello @Nawres GHARBI​ 

As a consequense What sould I do for create an interface with STemWIN? You can make a video for ST users for it.

Just Like @Duy Tran​  said, your pre-configured .ioc file changed nothing

--

I have applied your recommends but It changed nothing. Still have white screen @Vitaliy Chernobay​ 

--

Thank you for help @world04​  I think your answer is complicated a bit for me :grimacing_face:

Best Regards

brett23
Associate III
June 30, 2019

Hi. Did you ever get this to work.

I have the same issue

Thanks

Duy Tran
Associate III
July 1, 2019

Hi,

Please debug your code starting from main. For my case, something went wrong which caused failure in a MX_ init functions.