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


configTICK_RATE_HZ modify

Posted by Michael Chiu on January 31, 2012
I’m trying to turn off the HOCO of RX210, and just use LOCO (@125k Hz) for system clock now.
Due to the low system clock, I also modify the value of “configTICK_RATE_HZ” to 100 (1000 is default).
1.Does it right action to modify the value of configTICK_RATE_HZ in FreeRTOSConfig.h? Because I find if it’s too high will cause system works very slow.
2.Does there had any known side effect when configTICK_RATE_HZ become lower?

RE: configTICK_RATE_HZ modify

Posted by Richard on January 31, 2012
A few comments:

1) 125KHz is an extremely slow frequency at which to run a fully active system. 125KHz is, I imagine, ideal for use while in a power saving mode. If you system is fully active (performing is primary function, rather than doing background tasks while saving power) then using such a slow clock will make things like interrupt take a long time to execute - so you would be right to lower the tick frequency. Most applications would reduce the tick frequency as 1KHz is not optimal for most applications. Just keep in mind that you are running the system at a very small fraction of its maximum clock rate, so things will be much much slower to execute.

2) Have you told the FreeRTOS scheduler that the clock is so much slower? On the RX200 there are two settings, configCPU_CLOCK_HZ and configPERIPHERAL_CLOCK_HZ, these are both in FreeRTOSConfig.h and, by default, map to the ICLK_FREQUENCY and PCLK_FREQUENCY settings in rskrx210def.h. It is likely that the timer used to generate the tick interrupt is using the configPERIPHERAL_CLOCK_HZ setting (it is by default), so if that value is wrong then everything will be wrong.

3) The side effect of having a slower tick frequency is lower timing resolution. Ticks are used to measure time. If you use a slower tick frequency then you cannot measure time with the same accuracy. If that matters or not depends on your application.

I recommend that you check your system configuration by measuring to tick frequency to ensure it is as you expect it to be. This can be done by defining a tick hook function that toggles and output, and then measuring the toggle frequency on the output.


RE: configTICK_RATE_HZ modify

Posted by Michael Chiu on February 1, 2012
Thanks for your reply.

2) Yes, I had also modifyied this two value in rskrx210def.h.

[ 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