FreeRtos : Only one task Running

Hello @mardana,

Welcome to FreeRTOS forums!

If it is the same microcontroller and your code is exactly the same, then it should work smoothly. It is weird that it does not.
Your task definitions look okay to me. We can rule out them being an issue.

We can go over some basic checks to verify that what is going on:

  • Can you check the return value of xTaskCreate to verify whether the tasks are actually created?
  • Did you try adding a break point to either task to see whether the breakpoints are being ‘hit’ which would tell us whether the task even runs once?
  • Can you enable asserts by adding a definition for configASSERT in FreeRTOSConfig.h?
  • Can you verify that any task is not exceeding its stack space - unlikely as you as giving 1024 words worth of space to both tasks?

That should help us narrow down the problem.

Thanks,
Aniruddha