um0427\Project\Examples\TIM\TimeBase例程中,
/* ---------------------------------------------------------------
TIM2 Configuration: Output Compare Timing Mode:
TIM2CLK= 36 MHz, Prescaler = 4, TIM2 counter clock = 7.2 MHz
CC1 update rate = TIM2 counter clock / CCR1_Val = 146.48 Hz
CC2 update rate = TIM2 counter clock / CCR2_Val = 219.7 Hz
CC3 update rate = TIM2 counter clock / CCR3_Val = 439.4 Hz
CC4 update rate = TIM2 counter clock / CCR4_Val = 878.9 Hz
--------------------------------------------------------------- */
其中,TIM2CLK= 36 MHz,这个应该是APB的频率
但是为什么Prescaler = 4时 , TIM2 counter clock = 7.2 MHz ?
难道是TIM2 counter clock = 36 / (4+1)= 7.2 ?
其实简单地推理也能看出端倪,自己问一下自己:如果Prescaler = 0会有什么结果?同理如果Prescaler = 1会有什么结果?依此类推,不难得出结论。