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

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