When sysclk equals 72M,APB1 equals 36M APB2 equals 72M, the timer clock is 72M. Note This sentence: if the APB1/APB2 prescaler =1 The frequency is constant, otherwise the frequency x2. If at this time, APB1 Division 2, the PCLK1 external clock is 36M, at this time the timer clock X2 is 72M;APB2 Division 1, the PCLK2 external clock is 72M, at this time the timer clock equals PCLK2 clock 72M.
Second, timer Prescaler frequency
When the timer clock is set, a timer prescaler is required to further configure timing functions for different application cycles. At this time the timer clock frequency is 72m/tim_prescaler. Note that the value at this point is the frequency value, so a oscillation period is tim_prescaler/72m.
Third, the timer period or frequency and the PWM duty cycle setting
Set the value of the automatic load register, you can get different timing of the timer, the timing of the time period is: (tim_prescaler/72m) *tim_period. The PWM frequency is 1/: ((tim_prescaler/72m) *tim_period). Then set the value of the capture comparison register to determine the duty ratio of the PWM.