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] [February 2009 Threads] How to choose best TICK_RATE_HZ?Posted by Willem on February 17, 2009 Hi all (again),
In the documentation, it is stated that the default (1000hz) tick is higher than normally would be required.
What I notice is, that when i increase the tick count to 1050hz I never get a tick count. This happens only when there is a task available. When I just start the scheduler, i can get as high as 10.000 without any problem. I get the tick count by using a trace macro on the PIC32. What is this about? The task that is running is the only task and has nothing in it (except a continuous loop).
But my main question is, what is the best (highest) tick count without (crashing) sooner or later the tick count?
RE: How to choose best TICK_RATE_HZ?Posted by Willem on February 17, 2009 Sorry, had to add this text too.
And when I select a tick rate off 100, the task will run continuously. (Also measured using trace functions)
This is the tasks only function:
while(1){ vTaskDelay(5 / portTICK_RATE_MS );
}
RE: How to choose best TICK_RATE_HZ?Posted by Dave on February 17, 2009 portTICK_RATE_MS will be less than 0 if configTICK_RATE_HZ is greater than 1000. As its an integer it will probably be a divide by zero.
RE: How to choose best TICK_RATE_HZ?Posted by Willem on February 17, 2009 I just found out so :)
Thank you very much!
RE: How to choose best TICK_RATE_HZ?Posted by Raphael Derosso Pereira on February 17, 2009 If you want, use the following macro for a generic greater than 1000 ticks converter:
#define rtos_convert_to_ms(A) (((A * 1000)/(1000000 / configTICK_RATE_HZ)))
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|