I am now working on threads.
I created another task(RFID_task) with the GUI_task(GuiThread). but both can not run simultaneously.
If i just print debug line(comment all other things in GUI_task) in GUI_task then both can run simultaneously. but if i use to uncomment the code in GUI_task then it stuck and didn't display GUI. i atteched my main function please refer.
Is any setting to do if i have to run another task with GUI_task?
Hope you can help. Have a nice day.
BOARD_Initialization(); /* Board Hardware Initialization */
BOARD_PeripheralInit(); /* LCD hardware Initialization */
if (xTaskCreate(RFID_Task, "RFID_Task", RFID_Task_STACKSIZE, NULL, 1, NULL) != pdPASS)
PRINTF("RFID Task creation failed!.\r\n");
if (xTaskCreate(GUI_Task, "GUI_Task", GUI_Task_STACKSIZE, NULL, 1, NULL) != pdPASS)
PRINTF("GUI Task creation failed!.\r\n");
a few weeks ago another user had a similar problem. I've explained how to add a task for testing reasons here.
Hopefully that can help you too.
first of all, good that both task are running if you just using the print statement.
Could you please check whether the stack and heap size is great enough?
You'll find the defines for that in “FreeRTOSConfig.h”:
#define configMINIMAL_STACK_SIZE ( ( uint16_t ) 128 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 10 * 1024 ) )
Depending on the complexity of your RFID task, you probably have to adapt this settings. If that doesn’t help, could you please try to change the task priority of you RFID task to any value higher than the GUI task has.
Btw, did you get any logging information in you console?
That might be useful to determine whether the UI starts correctly.
Ask Embedded Wizard
Welcome to the question and answer site for Embedded Wizard users and UI developers.
Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!