Dear All,
We are trying a code on Atmel SAM D21 for FreeRTOS. We have defined 2 tasks, one is a UART task that writes a string on the terminal and other one toggles a LED.
The UART task has a higher priority than the LED task.
When the UART task is suspended using vTaskSuspend(uart_task_handle), the LED task which has a lower priority doesnt execute.
Hi All,
I also found similar issue on SAMD21 Evaluation Board with FreeRtos.
case 1: Uart_Task_priority ==> 1 & LED_Task_Priority ==> 2
Handler is Declared but not assigned to any task.
both the task didn’t execute with suspending the handler
case 2: Uart_Task_priority ==> 2 & LED_Task_Priority ==> 1
Handler is Declared but not assigned to any task.
LED_Task is executed. But, Uart_Task is not executed.
with suspending the handler.
case 3: Uart_Task_priority ==> 2 & LED_Task_Priority ==> 1
Handler is Declared but not assigned to any task.
both the task didn’t execute.
without suspending the handler
case 4: USR_TASK_PRIORITY ===> 3 Uart_Task_priority ==> 2 & LED_Task_Priority ==> 1
handler is assigned to USR_Task
LED_Task & Uart_Task executed.
with suspending the handler.
case 5: USR_TASK_PRIORITY ===> 1 Uart_Task_priority ==> 2 & LED_Task_Priority ==> 3
handler is assigned to USR_Task
Uart_Task is executed. But, LED_Task is not executed.
with suspending the handler.
case 6: USR_TASK_PRIORITY ===> 1 Uart_Task_priority ==> 3 & LED_Task_Priority ==> 2
handler is assigned to USR_Task
LED_Task is executed. But, Uart_Task is not executed.
with suspending the handler.
case 7: USR_TASK_PRIORITY ===> 1 Uart_Task_priority ==> 3 & LED_Task_Priority ==> 2
handler is assigned to USR_Task
LED_Task is executed. But, Uart_Task is not executed.
without suspending the handler.
case 8: USR_TASK_PRIORITY ===> 1 Uart_Task_priority ==> 2 & LED_Task_Priority ==> 3
handler is assigned to USR_Task
Uart_Task is executed. But, LED_Task is not executed.
without suspending the handler.
What do you mean “Handler is Declared but not assigned to any task” and “handler is assigned to USR_Task”, etc? What handler? Could you have a buggy UART driver? Did you try with a simple polling driver in place of whatever you are using now?
Initially, task_uart & led_task was created to which the handler was not assigned. To further understand we created one more task i.e. task_USR to which we assigned handler. so that we can suspend or resume the task. But, presently we are only suspending the task_USR not resuming it back ever.