FreeRTOS SYSTickTimer frequency
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-03 10:10 PM - last edited on ‎2025-04-04 1:59 AM by mƎALLEm
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
- Labels:
-
STM32F4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-04 12:30 AM
Hello,
Please use </> button to share your code.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-04 12:54 AM
hi
I cant share you code sorry to say but if you need more data you can ask in reply.
B.R
Ashish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-04 1:24 AM
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.
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-04 1:58 AM
@Ash1 wrote:
hi
I cant share you code sorry to say but if you need more data you can ask in reply.
B.R
Ashish
https://community.st.com/t5/community-guidelines/how-to-insert-source-code/ta-p/693413
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-04 3:49 AM
Hi
I have shared again.
mnote pfa attachment for clock too and tell me what clock will be fed to freertos
NVIC_SetPriority(TIM2_IRQn, 0x00);
NVIC_EnableIRQ(TIM2_IRQn);
NVIC_SetVector(TIM2_IRQn, (uint32_t)&TIM2_IRQ_Handler);
#define configSYSTICK_CLOCK_HZ ( configCPU_CLOCK_HZ )
#define configCPU_CLOCK_HZ ( ( unsigned long ) 16000000 )
.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-04 4:09 AM - edited ‎2025-04-04 4:10 AM
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:
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.
