Quality RTOS & Embedded Software

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


Loading

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)))


[ 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