cancel
Showing results for 
Search instead for 
Did you mean: 

STM32, how to capture events on both edges?

Asantos
Senior
Posted on July 28, 2011 at 02:35

Are there any way to configure the TIMx to capture events on both edges for the same input?

something like the configuration for capture pwm input.

#about-pwm-input
5 REPLIES 5
wangzhihai_138
Associate II
Posted on July 28, 2011 at 05:47

You can use PWM input mode. Use CCR1&CCR2 to configure it.

wangzhihai_138
Associate II
Posted on July 28, 2011 at 05:54

wangzhihai_138
Associate II
Posted on July 28, 2011 at 06:04

laurie
Associate II
Posted on June 16, 2012 at 12:08

Hi,

I'm trying to do the same thing.

I've tried changing CC1P in the interrupt routine so that the opposite edge then triggers the next interrupt.

Did you find a solution?

laurie
Associate II
Posted on June 17, 2012 at 05:32

In case you didn't get this solved you might find this link helpful:

https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/TIM_ICPolarity_BothEdge not available for most timers

and just change the setup to enable interrupts on CC1E (turn on CC1IE) as well.

...Laurie:{)