APB1 TIM2 clock frequency
I want to use tim 2 at the frequency of APB1 and not to the sysclock how i can do that, can somoene explain me or look at my code at the bottom to help me i want to use the 0.09375 frequency for my projet. thanks

I want to use tim 2 at the frequency of APB1 and not to the sysclock how i can do that, can somoene explain me or look at my code at the bottom to help me i want to use the 0.09375 frequency for my projet. thanks

Hello @Skyy_Tsuki ,
The following statement is mentioned in RM0008, section RCC:
The timer clock frequencies are automatically fixed by hardware. There are two cases:
1. if the APB prescaler is 1, the timer clock frequencies are set to the same frequency as
that of the APB domain to which the timers are connected.
2. otherwise, they are set to twice (×2) the frequency of the APB domain to which the
timers are connected.
Currently, your APB prescaler is set to 2, therefore the second point is applied.
I could recommend you to divide by 2 the input clock frequency of timer by setting Internal Clock Division (CKD) parameter in CubeMX.
Kind Regards,
Gwénolé
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.