Page 1 of 1

counting pulses using STM32F407G

Posted: Sat May 18, 2019 4:53 pm
by champ1
I am new here so if I ask the wrong question, please forgive me. I have STM32F407G and I am using TrueSTUDIO for STM32F407G

I want to use of timer of STM32F407G for counting external pulses that are applied to the pin STM32F407G

Looking for sample code

Re: counting pulses using STM32F407G

Posted: Tue Jul 02, 2019 7:10 pm
by frank_ee
Hello,

Setup a timer for input capture with rising edge detection. In the timer interrupt service routine, increment a counter on every interrupt entry.