2014-02-05 04:42 AM
Hi,
Kit using : STM32Discovery Board(STM32F100 controller)I have implemented the input capture mechanism for Timer15 channel 1. In which I set triggering for both falling and rising edge.Now I am trying to port the application to Timer2 channel 2. But the problem what I facing is, in Timer2 I can't find any option to trigger both edge. Only one edge triggering is possible. So is there any mechanism to enable both edge triggering for Timer2.Please help me to come out of the situation.....ThanksSooraj Mannangal #input-capture #stm32discovery2014-02-05 06:42 AM
There are so many errors in the timers' documentation(*) (including AN4013), that I'd simply try first to write to both CC2P and CC2N of TIM2_CCER, regardless of what the UM says.
If this fails, you always can use simultaneously capture 1 and capture 2, having capture 2 trigger on one edge and capture 1 on the other, by ''redirecting'' (and inverting) the input from CH2 to capture 1 (by setting TIM2_CCMR1.CC1S to 10). JW (*) For example, for said TIM2_CCER.CC1P, RM0041 rev.4 ch.13.4.9 p.325 has to say ''This bit selects whether IC1 or IC1 is used for trigger or capture operations''. I am tired of repeating: it's a shame.2014-02-13 12:27 AM
Thanks, second solution works for me.