How ARR value impact on timer input capture result?
Hello guys,
I have just started working with stm32 controllers. I am trying to capture the frequency of signal using timer 2 input capture mode.
I am getting absolutely correct frequency if i use ARR = 65535 but when i use ARR = 0xffffffff (As timer 2 is 32bit) i am getting wrong result.
I am using this reference equation
Frequency = TIM_CLOCK / ((C2-C1)*(prescaler+1))
Where C2 = capture value 2 // Both Rising edge
C1 = capture value 1
TIM_CLOCK = 1Mhz
TIMER_PSC = 16-1
SYSTEM_CLOCK = 16Mhz
Please help if i am missing something.
