From dfeeda24ba5acbd0bbad7ba9fbfb2cdffa5c473f Mon Sep 17 00:00:00 2001 From: podhrmic Date: Fri, 8 Nov 2013 16:00:51 -0700 Subject: [PATCH] [timers] Fixed typo - Bit shift should be 2, not 4 (see the datatsheet - TIMx_CMMR2 register) --- lib/stm32/common/timer_common_all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/stm32/common/timer_common_all.c b/lib/stm32/common/timer_common_all.c index 6cbc4c7c..3d14ae22 100644 --- a/lib/stm32/common/timer_common_all.c +++ b/lib/stm32/common/timer_common_all.c @@ -2021,7 +2021,7 @@ void timer_ic_set_prescaler(uint32_t timer_peripheral, enum tim_ic_id ic, break; case TIM_IC3: TIM_CCMR2(timer_peripheral) &= ~TIM_CCMR2_IC3PSC_MASK; - TIM_CCMR2(timer_peripheral) |= psc << 4; + TIM_CCMR2(timer_peripheral) |= psc << 2; break; case TIM_IC4: TIM_CCMR2(timer_peripheral) &= ~TIM_CCMR2_IC4PSC_MASK;