cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f429 discovery gui_init

artemryvkin
Associate II
Posted on January 09, 2015 at 19:00

Can I use GUI_init (I mean gui library) without freertos? I've just seen a lot of examples with GUI_init, and all these examples were only with freertos. I'm trying to make a simple example (drawing something on lcd) and my program hangs in GUI_Init.

I don't use FreeRTOS.
5 REPLIES 5
Posted on January 09, 2015 at 19:09

Yes, it hangs where exactly? Be precise what is the code (assembler) surrounding where it is hanging.

Do you have the CRC peripheral enabled?

/* Enable CRC clock */

RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_CRC, ENABLE);

https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/STemWin%20GUI_Init%28%29%20crashed&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=1425

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
artemryvkin
Associate II
Posted on January 09, 2015 at 20:28

It hangs right here (see attachment). It takes place in function _DMA_Fill. And I madethe CRC peripheral enabled

________________

Attachments :

Screen.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzM4&d=%2Fa%2F0X0000000bLQ%2FPpDe1HQQPHGr1x.exo8i7hhafSae8ke0rqiF6ftVcM4&asPdf=false
Posted on January 09, 2015 at 20:57

Somewhat indicative that you haven't enable peripheral clocks for hardware you are using.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
artemryvkin
Associate II
Posted on January 09, 2015 at 21:46

What does it mean? here is my 

main

 function. And i made RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_CRC, ENABLE)

In spite of this my program hangs where I've already showed.

int main(void)

{

RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_CRC, ENABLE);

GUI_Init();

/* LTDC initialization */

LCD_Init();

LCD_LayerInit();

LTDC_Cmd(ENABLE);

LCD_SetLayer(LCD_FOREGROUND_LAYER);

LCD_Clear(LCD_COLOR_WHITE);

LCD_SetFont(&Font8x8);

    LCD_DisplayStringLine(LINE(32), (uint8_t*)''              Touch Panel Paint     '');

    LCD_DisplayStringLine(LINE(34), (uint8_t*)''              Example               '');

LCD_SetTextColor(LCD_COLOR_MAGENTA); 

LCD_DrawFullEllipse(100, 60, 50, 20);

    LCD_SetTextColor(LCD_COLOR_BLUE2); 

    LCD_DrawFullRect(5, 250, 30, 30);

    LCD_SetTextColor(LCD_COLOR_CYAN); 

    LCD_DrawFullRect(40, 250, 30, 30);

    LCD_SetTextColor(LCD_COLOR_YELLOW); 

    LCD_DrawFullRect(75, 250, 30, 30);

    LCD_SetTextColor(LCD_COLOR_RED); 

    LCD_DrawFullRect(5, 288, 30, 30);

    LCD_SetTextColor(LCD_COLOR_BLUE); 

    LCD_DrawFullRect(40, 288, 30, 30);

    LCD_SetTextColor(LCD_COLOR_GREEN); 

    LCD_DrawFullRect(75, 288, 30, 30);

    LCD_SetTextColor(LCD_COLOR_MAGENTA); 

    LCD_DrawFullRect(145, 288, 30, 30);

    LCD_SetTextColor(LCD_COLOR_BLACK); 

    LCD_DrawFullRect(110, 288, 30, 30);

    LCD_DrawRect(180, 270, 48, 50);

    LCD_SetFont(&Font16x24);

    LCD_DisplayChar(LCD_LINE_12, 195, 0x43);

    LCD_DrawLine(0, 248, 240, LCD_DIR_HORIZONTAL);

    LCD_DrawLine(0, 284, 180, LCD_DIR_HORIZONTAL);

    LCD_DrawLine(1, 248, 71, LCD_DIR_VERTICAL);

    LCD_DrawLine(37, 248, 71, LCD_DIR_VERTICAL);

    LCD_DrawLine(72, 248, 71, LCD_DIR_VERTICAL);

    LCD_DrawLine(107, 248, 71, LCD_DIR_VERTICAL);

    LCD_DrawLine(142, 284, 36, LCD_DIR_VERTICAL);

    LCD_DrawLine(0, 319, 240, LCD_DIR_HORIZONTAL);

 

  while(1)

  {

  }

}

Posted on January 09, 2015 at 22:07

Ok, but your screen grab gives a very narrow perspective of the problem.

Shouldn't you call LCD_Init() where the LTDC/DMA2D clocks are enabled BEFORE calling GUI_Init()?

They will also need IRQ Handlers.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..