Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

Tick rate of RTOS, strange behaviour

Posted 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: measurements.

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 behaviour

Posted 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 behaviour

Posted 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


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner