Questions about SystemClock_Config() generated by cubeMX
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-04-11 11:23 PM
Posted on April 12, 2018 at 08:23
The SystemClock_Config() function is generated by cubeMX in main.c. It configure the different clocks used by the system. The question is that it handles the systick timer count in this way:
HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq()/1000);
It just divides the Hclk frequency by 1000 (assume the system timer clock is provided by HCLK). This result in 1ms tick regardless the actual value of systick set in the freeRTOS configuration in freeRTOSConfig.h. I assume something like
HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq()/configTICK_RATE_HZ);
should be used.
This discussion is locked. Please start a new topic to ask your question.
0 REPLIES 0
