2025-07-28 8:08 AM - last edited on 2025-07-28 8:23 AM by Andrew Neil
Hey @eBirdman
I know this is an old question, but I got into the situation to wonder about this too. After some research through the mystical STM documentation and some educated guesses I compiled this document. It might prevent others from the pain to find information in the STM documentation.
Timer | APB Bus | Base Clock Source | Timer Kernel Clock | Clock Register |
TIM1 | APB2 | rcc_pclk2 | rcc_timy_ker_ck | RCC_APB2ENR |
TIM8 | APB2 | rcc_pclk2 | rcc_timy_ker_ck | RCC_APB2ENR |
TIM15 | APB2 | rcc_pclk2 | rcc_timy_ker_ck | RCC_APB2ENR |
TIM16 | APB2 | rcc_pclk2 | rcc_timy_ker_ck | RCC_APB2ENR |
TIM17 | APB2 | rcc_pclk2 | rcc_timy_ker_ck | RCC_APB2ENR |
TIM2 | APB1 | rcc_pclk1 | rcc_timx_ker_ck | RCC_APB1LENR |
TIM3 | APB1 | rcc_pclk1 | rcc_timx_ker_ck | RCC_APB1LENR |
TIM4 | APB1 | rcc_pclk1 | rcc_timx_ker_ck | RCC_APB1LENR |
TIM5 | APB1 | rcc_pclk1 | rcc_timx_ker_ck | RCC_APB1LENR |
TIM6 | APB1 | rcc_pclk1 | rcc_timx_ker_ck | RCC_APB1LENR |
TIM7 | APB1 | rcc_pclk1 | rcc_timx_ker_ck | RCC_APB1LENR |
TIM12 | APB1 | rcc_pclk1 | rcc_timx_ker_ck | RCC_APB1LENR |
TIM13 | APB1 | rcc_pclk1 | rcc_timx_ker_ck | RCC_APB1LENR |
TIM14 | APB1 | rcc_pclk1 | rcc_timx_ker_ck | RCC_APB1LENR |
The actual timer kernel clock frequency depends on the APB prescaler and TIMPRE bit setting:
2025-07-28 7:05 PM
I have to admit generally the STM documentation is respectively good comparing to most of other MCU manufacturers.
But this absence of information of which internal clock bus feeds which timers was quite puzzling. Too much time I spent in the user manual research for each timer I used. Detail chapter on each timer does not have this information ! Recently I couldn't trust even AIs as different models of the most advanced AIs were given different answers :)
Your post is quite helpful . Kudos.