Quality RTOS & Embedded Software

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


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


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


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