2018-06-11 01:48 AM
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 ?
2018-06-11 02:40 AM
Publish yuor .ioc file
2018-06-11 03:47 AM
Here is the .ioc file.
________________ Attachments : main_mcu_source.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxVE&d=%2Fa%2F0X0000000azP%2FEJQ9xSqSlEytmJqlYNe5njhFeL_.kUd13PBVxiR8U6Y&asPdf=false2018-06-11 12:26 PM
Maybe it is strange, but the problem is in gui_init. had you got some idea about the problem ?
2018-06-11 12:49 PM
Enabling the CRC clock is required for the stemwin library to function.
Have you done this:
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_CRC, ENABLE);
2018-06-11 01:25 PM
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)
2018-06-11 01:51 PM
very strange parameters for GRAPHICS configurations
Color Conversion
FMC Bank address
Platform Setting
2018-06-11 01:58 PM
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...
2018-06-11 02:50 PM
GUI_init()
does not work when its data is incorrect2018-06-11 02:51 PM
This is generated automatically by CubeMX