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] [May 2015 Threads] Tick rate of RTOS, strange behaviourPosted by ogor4 on May 29, 2015 Hello all,
I'm making series of tests for FreeRTOS and other RTOSs. One of the test look like this:
- create thread which make series of calculation on [1024] unsigned long array (global), when all calculation are performed increase counter (unsigned long). Repeate whole proces again, and again...
- create higher priority thread which preempt "calculation" thread after 15 seconds (using vTaskDelay).
I want to test it for tick rate 10, 100, 250, 500 and 1000 Hz.
I found this strange behaviour:
.
As you can see this is OS - independend (blue - first RTOS, red - second RTOS). 100 and 250 Hz performance are really bad, and 500 and 1000 Hz back to "normal". I think that higher tick rate call OS more frequently and performance should decrease. Any ideas what are happened there?
FreeRTOS config: http://textuploader.com/z7ku
If you need more information don't hestitate to ask.
BR,
MG
Tick rate of RTOS, strange behaviourPosted by rtel on May 29, 2015 I would expect the difference to be negligible.
Can you show the code that calculates the delay time.
Also can you verify the tick rate you think you are getting is the tick rate you actually get by viewing the xTickCount variable in task.c or using a scope as it may be in the strange cases the processor is just continuously reentering an interrupt.
Regards.
Tick rate of RTOS, strange behaviourPosted by ogor4 on May 29, 2015 Hi,
I simply used
vTaskDelay((seconds * configTICKRATEHZ))
since
define portTICKPERIODMS ( ( TickTypet ) 1000 / configTICKRATE_HZ ).
I print the value of xTaskGetTickCount(), after higher priority thread wakes ups:
1000 Hz:
1 wake up: 15000 ticks
2 wake up: 30039 ticks (those 39 ticks is okay to me, since after wake up, task prints all test results to LCD screen; after printing goes to sleep again)
3 wake up: 45078 ticks
250 Hz:
1 wake up: 3750 ticks
2 wake up: 7510 ticks
3 wake up: 11270 ticks
100 Hz:
1 wake up: 1500 ticks
2 wake up: 3004 ticks
3 wake up: 4508 ticks
From my POV values are correct. I put the code of tasks here: http://textuploader.com/z2uc
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|