# Some parameters in Freertos\_config\_file.h

**URL:** <https://forums.freertos.org/t/some-parameters-in-freertos-config-file-h/17370>\
**Category:** Kernel\
**Created:** [May 5, 2023, 5:14pm UTC](https://forums.freertos.org/t/some-parameters-in-freertos-config-file-h/17370 "2023-05-05T17:14:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hassanlahrar](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/hassanlahrar/32/3503_2.png) [@hassanlahrar](https://forums.freertos.org/u/hassanlahrar)\
**Post date:** [May 5, 2023, 5:14pm UTC](https://forums.freertos.org/t/some-parameters-in-freertos-config-file-h/17370/1 "2023-05-05T17:14:00Z")

</div>

Hello everyone,

Actually I start using Freertos as kernel for my Nucleo-stm32f103rb board. but I have some misunderstanding about the relationship between some parameters: configCPU\_CLOCK\_HZ, configTICK\_RATE\_HZ and peripheral timer. In my project in order to blink my LED each 1s (1s OFF and 1s ON), I use 36MHZ for my clock\_CPU and Timer2 that generate signal every 1s. So in order to my project works well i must put 10 in configTICK\_RATE\_HZ. if I change it there will be no blinking. Pls somene could highlight me about that ? the relationship between these 3 parameters?

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [May 5, 2023, 6:37pm UTC](https://forums.freertos.org/t/some-parameters-in-freertos-config-file-h/17370/2 "2023-05-05T18:37:55Z")

</div>

Are you generating the tick interrupt from the Cortex-M’s internal SysTick clock? That is the default for Cortex-M, but I believe that clock is also used by the ST HAL so often ST users will instead generate the tick interrupt from a peripheral clock.

If you are using the default behaviour then configCPU\_CLOCK\_HZ should be set to 36MHz (36000000), and configTICK\_RATE\_HZ should be set to the frequency at which you want the tick interrupt to execute. It is common to use a 1KHz (1000) tick in our demos, partly the test the FreeRTOS port, and partly to keep the maths easy, but most real application will use a lower tick rate.

Once you do that, check the tick is executing at the rate you expect. That can be done using an LED, or a scope, or some other method. Then, if you want an event to occur at, say, 100ms intervals, use pdMS\_TO\_TICKS( 100 ) to specify the time interval. For example, vTaskDelay( pdMS\_TO\_TICKS( 100 ) );
