Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




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 ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists