FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [March 2015 Threads] Suspending a higher priority TaskPosted by sanhardik on March 16, 2015 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(uarttaskhandle), the LED task which has a lower priority doesnt execute.
Is this expected ?
Thanks
Suspending a higher priority TaskPosted by rtel on March 16, 2015 If the two tasks are independent then, no, that is not expected.
Does the LED task run when the UART task is not suspended?
Regards.
Suspending a higher priority TaskPosted by embeddedindia on March 17, 2015 Hi All,
I also found similar issue on SAMD21 Evaluation Board with FreeRtos.
case 1: UartTaskpriority ==> 1 & LEDTaskPriority ==> 2
Handler is Declared but not assigned to any task.
both the task didn't execute with suspending the handler
case 2: UartTaskpriority ==> 2 & LEDTaskPriority ==> 1
Handler is Declared but not assigned to any task.
LEDTask is executed. But, UartTask is not executed.
with suspending the handler.
case 3: UartTaskpriority ==> 2 & LEDTaskPriority ==> 1
Handler is Declared but not assigned to any task.
both the task didn't execute.
without suspending the handler
case 4: USRTASKPRIORITY ===> 3 UartTaskpriority ==> 2 & LEDTaskPriority ==> 1
handler is assigned to USRTask
LEDTask & Uart_Task executed.
with suspending the handler.
case 5: USRTASKPRIORITY ===> 1 UartTaskpriority ==> 2 & LEDTaskPriority ==> 3
handler is assigned to USRTask
UartTask is executed. But, LED_Task is not executed.
with suspending the handler.
case 6: USRTASKPRIORITY ===> 1 UartTaskpriority ==> 3 & LEDTaskPriority ==> 2
handler is assigned to USRTask
LEDTask is executed. But, Uart_Task is not executed.
with suspending the handler.
case 7: USRTASKPRIORITY ===> 1 UartTaskpriority ==> 3 & LEDTaskPriority ==> 2
handler is assigned to USRTask
LEDTask is executed. But, Uart_Task is not executed.
without suspending the handler.
case 8: USRTASKPRIORITY ===> 1 UartTaskpriority ==> 2 & LEDTaskPriority ==> 3
handler is assigned to USRTask
UartTask is executed. But, LED_Task is not executed.
without suspending the handler.
please helpme out in fixing these issue.
Thank you
Suspending a higher priority TaskPosted by edwards3 on March 17, 2015 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?
Suspending a higher priority TaskPosted by embeddedindia on March 19, 2015 static xTaskHandle terminaltaskhandle; // Declaration of task handler
xTaskCreate(taskUSR,(const char *) "USR",configMINIMALSTACKSIZE,NULL,USRTASKPRIORITY,terminaltask_handle);
xTaskCreate(taskuart,(const char *) "Uart",configMINIMALSTACKSIZE,NULL,UARTTASK_PRIORITY,NULL);
xTaskCreate(ledtask,(const char *) "LED",configMINIMALSTACKSIZE,NULL,LEDTASK_PRIORITY,NULL);
Initially, taskuart & ledtask was created to which the handler was not assigned. To further understand we created one more task i.e. taskUSR to which we assigned handler. so that we can suspend or resume the task. But, presently we are only suspending the taskUSR not resuming it back ever.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|