Question
Time Base for Timer in Encoder Mode
Posted on June 06, 2014 at 05:13
Hi ,
I came across the following codes .TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
TIM_TimeBaseStructure.TIM_Period = 0xffff;
TIM_TimeBaseStructure.TIM_Prescaler = 0;
TIM_TimeBaseStructure.TIM_ClockDivision = 0;
TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;
TIM_TimeBaseInit(TIM4, &TIM_TimeBaseStructure);
/* Configure the timer */
TIM_EncoderInterfaceConfig(TIM4, TIM_EncoderMode_TI12, TIM_ICPolarity_Rising, TIM_ICPolarity_Rising);
/* TIM4 counter enable */
TIM_Cmd(TIM4, ENABLE);
I couldnt find any reference to how the time base is used when set to encoder mode.
Why is the peroid set to 65535 ? Thanks
#timers #timer-encoder-qei #stm32f3