I have problems to calculate back from timersteps to seconds. I'm using TIMER2. cpu clock is 72MHz so TIMER2 at APB1 should be f_APB1=36MHz. I would calculate the time t=(TIM_PSC x TIM_CNT)/f_APB1 i.e. PSC = 200, CNT = 13000 t=0,072s But when I measure the signal I get 0,034s. It seems that f_APB1=72MHz or somewhere else is a factor 2 ?!? Attached are pictures of the RCC and TIM2 configuration. Do you have any idea? Cheers, Michael
It took me 2 days more to understand it: TIM2 can be clocked with 72MHz although APB1 = 36MHz. Because of the multiplicator when the prescaler is not 1. APB1 and its following peripheral is not affected by the multiplicator. Michael