Skip to main content
Explorer
April 4, 2025
Solved

FreeRTOS SYSTickTimer frequency

  • April 4, 2025
  • 1 reply
  • 1067 views

Hi

I am trying to run freeRTOS on STM32f407 so I want to know at what frequency my clock will run let me share you my clocking diagram too.

another doubt how to enable SysTick_Handler.

other external interrupt I have enabled like this 

NVIC_SetPriority(TIM2_IRQn, 0x00);

NVIC_EnableIRQ(TIM2_IRQn);

NVIC_SetVector(TIM2_IRQn, (uint32_t)&TIM2_IRQ_Handler);

Note :

#define configSYSTICK_CLOCK_HZ ( configCPU_CLOCK_HZ )
#define configCPU_CLOCK_HZ ( ( unsigned long ) 16000000 )

is it correct

B.R

Ashish

    This topic has been closed for replies.
    Best answer by mƎALLEm

    Hello,

    First , please use CubeMX to generate a FreeRTOS project. 

    Second, in CubeMx, FreeRTOS needs system tick not a timer for its kernel tick. Need to select another timer for HAL:

    Example TIM6:

    mALLEm_0-1743764474608.png

    Third, the system tick FreeRTOS kernel is running at 1ms rate: 

    From FreeRTOSConfig.h:

    #define configTICK_RATE_HZ ( ( TickType_t ) 1000 )

    Attached an ioc file.

    Hope that helps.

    1 reply

    Technical Moderator
    April 4, 2025

    Hello, 

    Please use </> button to share your code.

    Thank you 

    Ash1Author
    Explorer
    April 4, 2025

    hi 

    I cant share you code sorry to say but if you need more data you can ask in reply.

    B.R

    Ashish

    Super User
    April 4, 2025

    What @mƎALLEm means is that you need to use the proper formatting for the code that you did include in your post.

    See How to insert source code for full instructions.

    See also How to write your question to maximize your chances to find a solution.