cancel
Showing results for 
Search instead for 
Did you mean: 

Measure frequency up to 10kHz

kalpeshpatil102
Associate III
Posted on October 14, 2016 at 13:14

hi , i want to measure frequency  using stm32f0.i didn't  get how use input capture direct  mode in timer refer

http://https://www.youtube.com/watch?v=_wE7tbilca4

i am using keil MDK 5 and cube mx for programming .

please help me . i didn't understand what to do ? i am new in stm32.

thank you

3 REPLIES 3
Posted on October 14, 2016 at 14:43

Input capture allows you to timestamp the edges of the input signal, from this you can deduce the period, and thus infer the frequency, right? The granularity of the time measurement is controlled by the frequency selected for the timebase. If your timebase clocks at 1 MHz there will be 100 ticks during a 10 KHz period.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
kalpeshpatil102
Associate III
Posted on October 15, 2016 at 07:47

thank you clive1 . can you please give example code or tutorial for input capture or reference manual for better understanding for me.

valentin
Senior
Posted on October 16, 2016 at 21:41

Have a look at the PWM input example. It's all in there. Frequency and duty cycle.