I am using VisualGFX to develop a user interface for my STM32F429i-Discovery board. VisualGFX has built in freeRTOS usage with a GUITask being created to handle the GUI operations. I am then trying to create a new task called ControllerTask with the xTaskCreate API function from freeRTOS, same function as is used to create the GUITask.
However, as soon as I create this second Task the GUITask displays some weird values on my GUI and there is no functionality.
int main(void){
...
xTaskCreate(GUITask, (TASKCREATE_NAME_TYPE)"GUITask",
configGUI_TASK_STK_SIZE,
NULL,
configGUI_TASK_PRIORITY,
NULL);
xTaskCreate (ControllerTask, (TASKCREATE_NAME_TYPE)"ControllerTask",
configController_TASK_STK_SIZE,
NULL,
configController_TASK_PRIORITY,
NULL);
vTaskStartScheduler();
for (;;);
The above code shows the creation of the two tasks. The priority of the GUITask is higher as that of the ControllerTask. The next piece of code shows the Task implementation.
static void GUITask(void* params)
{
touchgfx::HAL::getInstance()->taskEntry();
}
static void ControllerTask(void* params)
{
while(1)
{
vTaskDelay(3000);
}
}
As can be seen the implementation of the ControllerTask at this moment in time is only Delaying the Task for roughly 3 seconds each time it is switched to.
However, the GUITask gets stuck and no GUI updates or interaction is possible.
xTaskCreate
? – D Krueger