2015-09-01 02:41 AM
Hi
I was trying to configure the input capture in STM32F103RC , and facing issues , The configuration is done as follow I was trying to configure TIM1 CH3 , RCC->APB2ENR |= RCC_APB2ENR_TIM1EN; NVIC_EnableIRQ(TIM1_CC_IRQn); /* reset the Register */ TIM1->CCMR2 |= 0x0001; /* as input capture for TI3 */ TIM1->CCER &= ~0x0200; TIM1->CCER |= 0x0100; TIM1->DIER |= 0x00000008; /* Enabling CC3 Interrupt Enable */ TIM1->PSC = 0x00FF; /* Configuring Prescalar */ TIM1->DMAR = 0x0000; TIM1->ARR = 0x0000; /* Configure the capture control for CH3 */ TIM1->EGR |= 0x00000001; TIM1->CR1 |= 0x0001; Interrupt is not happening and the TIM1_CCR3 register is not getting updated with the Captured value. Am i missing something ,or should we do anything special to capture signal in TIM1_CH3 Help is very much appreciated Thanks & regards kamaraj #timer2015-09-01 09:59 AM
May be you need the MOE bit of BDTR set?
2015-09-02 05:41 AM
Thank you for the response,Setting the MOE bit didn't solve the issue,
I am using STM32f103RCT6 (64 pin ) micro and input signal is connected to (PB15)TIM1_CH3. From the documention my understanding is that TI3FP3 should be Selected for Input capture, I could not find TI3FP3 in this micro to configure.Is my understanding is correct, Is there any work around to solve this. Thanks kamaraj2015-09-02 08:46 AM
Isn't PB15 the TIM1_CH3N (Negated), not sure that's a viable input source.
The TIMx_CCMR2 should be able to select TI3 as the input capture source.2015-09-02 09:32 AM
I don't use the 'F1xx , but are you sure PB15 can be used as TIM1_CH3? As far as I can see in the datasheets it's TIM1_CH3N.
JW [EDIT] Sorry I missed Clive's identical and earlier answer2015-09-11 05:28 AM
Thanks clive and JW , the Pin doesnt support the functionality , I changed the hardware pin and it is working now , thanks for your timely support