cancel
Showing results for 
Search instead for 
Did you mean: 

Timer rising edge

mosine
Associate II
Posted on July 31, 2013 at 08:33

Hi,

I'm working with stm32f2. I need example code, to count time between two rising edge of GPIO. 

I read somewhere, that is possibile by appropriate timer's configuration without GPIO's interrupt. Can you help me?

Thanks

#pwm-input
2 REPLIES 2
Posted on July 31, 2013 at 14:37

You'd use a TIM with CHx in ''input capture'' mode, have it interrupt on CCx and compute the delta of values latched in CCRx between one event and the next.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Tomas DRESLER
Senior II
Posted on July 31, 2013 at 17:57

Or, try PWM Input mode, this way you get a 0-based delta.

Examples are in the FW library.

Edison