STM32 clock switching, systick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-23 6:08 AM
Hello, I have a simple question: What is the way to update the SysTick configuration after changing the clocks at runtime? I am switching SYSCLK between two modes:
1) RUN mode: HSE 32 MHZ
2) LPRUN mode: MSI 2 MHZ
After changing to (2), the HAL_GetTick() function is running slow and needs reconfiguring. Using STM32WB
Solved! Go to Solution.
- Labels:
-
RCC
-
STM32CubeMX
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-23 6:42 AM
If you call HAL_RCC_ClockConfig, it is updated automatically.
If you update the clock some other way, you will need to update SystemCoreClock and call HAL_InitTick after the clock has changed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-23 6:42 AM
If you call HAL_RCC_ClockConfig, it is updated automatically.
If you update the clock some other way, you will need to update SystemCoreClock and call HAL_InitTick after the clock has changed.
