2015-01-09 10:00 AM
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.2015-01-09 10:09 AM
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);2015-01-09 11:28 AM
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=false2015-01-09 11:57 AM
Somewhat indicative that you haven't enable peripheral clocks for hardware you are using.
2015-01-09 12:46 PM
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) { }}2015-01-09 01:07 PM
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.