This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP432E401Y: Execution Getting Stuck on a single task of application containing two tasks

Part Number: MSP432E401Y

Hi 

I am new to FREE RTOS, learning it using MSP432E401Y.

I just tried to execute a code containing two tasks, first task prints "Task1" on the console and the second one prints "Task2".

I build it without any error. When I ran it only "TASK1" is getting printed on the console continuously. The execution gets stuck in the first task function and does go to the second task.

What are the possible reasons for it and how can I fix it?

I have given equal priority to both tasks.

Moreover, if I give a higher priority to the second task, "Task2" keeps on printing.

here is the code:

void thread1(void *p2)
{
    for(;;)
       {
           printf("Task1");
       }
}


void thread2(void *p)
{
   for(;;)
   {    printf("Task2")
    }
}
int main(void)
{


    /* Call driver init functions */
    Board_init();

    xTaskCreate(thread1,"a",1024,NULL,1,NULL);
    xTaskCreate(thread2,"b",1024,NULL,1,NULL);

    vTaskStartScheduler();

    return (0);
}

**Attention** This is a public forum