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] [July 2015 Threads]
Hi,
I am trying to implement following scenarios, if any guide to achieve this will be helpful.
- Before starting scheduler, I have created 4 tasks, one timer and one interrupt
- By default all task should not be running, somewhere I read this can be managed by assigning -ve priority to the task. Is it correct implementation?
- Whenever timer expires it checks for condition and makes certain task ready for execution (means changing the priority of tasks at run time)
when the task is completed task itself change the priority to -ve again.
Above three are true if -ve priorities can be assigned, if not what is other method to achieve?
If interrupt is occurring than system has to log some points in memory and than resets
If system is hanged and none of the task or timer or interrupt is able to execute for some time than system has to reset.
Thanks,
Bhavesh
You cannot use a negative priority.
If you want to create a task before the scheduler has started, but don't want the task to run, then create the task with xTaskCreate(), using the pvCreatedTask to obtain the task's handle, then use the handle in a call to vTaskSuspend(). It is ok to do that before the scheduler has started, and means the tasks will be suspended when the scheduler starts.
To make a task ready for execution you can then use vTaskResume() in a software timer, or xTaskResumeFromISR() from an interrupt. You have to be careful doing that though - see the API documentation for xTaskResumeFromISR() for the reason why.
If you want to detect the system is hanging then you can have each task maintain a counter, then use a higher priority task to monitor all the counters to ensure they are still counting and not stalled. Most of the standard demo applications provided with FreeRTOS do that.
Regards.
Hi,
Thanks for suggestion and I have tested the same on POC with 1 timer and 1 task.
I will update thread if find any difficulty in case of multiple tasks.
Thanks,
Bhavesh
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.