cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F429 Stuck in GUI_init() after generation using STM32cubeMX V4.26

abdberkana
Associate II

Posted on June 11, 2018 at 10:48

Hi guys, I'm using STM32CubeMx V4.26 to configure STM32F429 that is connected to TFT LCD. I m trying to get my TFTLCD to work with StemWin using FreeRTOS. My program compile and link smoothly without problem. Running the program in the hardware leads to an MCU stuck in the function : GUI_init()

I ve checked some similar issues and it looks to be related to the graphic library and RCC clock.

Could any one have guidance for this issue ? are there some sample code ? 

26 REPLIES 26
Posted on June 11, 2018 at 11:40

Publish yuor .ioc file

abdberkana
Associate II
abdberkana
Associate II
Posted on June 11, 2018 at 21:26

Maybe it is strange, but the problem is in gui_init. had you got some idea about the problem ?

Self.Glenn
Associate III
Posted on June 11, 2018 at 21:49

Enabling the CRC clock is required for the stemwin library to function.

Have you done this:

RCC_AHBPeriphClockCmd(RCC_AHBPeriph_CRC, ENABLE);

       
Self.Glenn
Associate III
Posted on June 11, 2018 at 22:25

Do you have a GUI_X.c with something like this. This version is for a non-rtos system

GUI_TIMER_TIME GUI_X_GetTime(void) {

  //return OS_TimeMS;

    return (GUI_TIMER_TIME)glbMilliSecTick;       

void GUI_X_Delay(int ms) {

  //int tEnd = OS_TimeMS + ms;

  //while ((tEnd - OS_TimeMS) > 0);   

      int tEnd = (GUI_TIMER_TIME)glbMilliSecTick + ms;

      while ((tEnd - (GUI_TIMER_TIME)glbMilliSecTick) > 0);

Finally, do you have GUIDRV_Template.c with functions tailored for your LCD (if required)

Posted on June 11, 2018 at 20:51

very strange parameters for GRAPHICS configurations

Color Conversion

FMC Bank address

Platform Setting

Self.Glenn
Associate III
Posted on June 11, 2018 at 22:58

And do you have your LCD_Initialisation code in LCDConf.c (or its Cube+rtos equivalent)

My apologies if this is all very obvious...

int LCD_X_DisplayDriver(unsigned LayerIndex, unsigned Cmd, void * p) {

int r;

(void) LayerIndex;

(void) p;

switch (Cmd) {

case LCD_X_INITCONTROLLER: {

LCD_Initialization();                                    //Call your initialisation code here

GUI_SetScreenSizeY(VYSIZE_PHYS);

GUI_SetScreenSizeX(VXSIZE_PHYS);

//

// Called during the initialization process in order to set up the

// display controller and put it into operation. If the display

// controller is not initialized by any external routine this needs

// to be adapted by the customer...

//

// ...

r=0;

break;

}

case LCD_X_SETVRAMADDR:

r=-1;

break;

etc...

Posted on June 11, 2018 at 21:50

GUI_init()

does not work when its data is incorrect
Posted on June 11, 2018 at 21:51

This is generated automatically by CubeMX