2009-05-17 07:03 AM
Timer Config.
2011-05-17 04:07 AM
Hey everyone,
I am using the STM32F103 VE chip in my project. I need to be able to record the timing between to events to measure the speed of a device. When I get an external interrupt on one of my GPIO's I know that a wheel has moved x inches. So, every time I get this interrupt I would want to start a counter and then stop , record the difference and start the timer again. More specifically one of my GPIO pins will be high and when i get an interrupt it will be pulled low, signaling the fact that the wheel has moved x inches. Then I clear the interrupt and the same thing continues. I have TIM8 on that pin. I was wondering what configuration would be most suitable to get the time difference between the two events. Thanks for your help! -Regards.2011-05-17 04:07 AM
hi ,
Take a look on the STM8S Firmware TIM1 example ''TIM1_Input_Capture'', it calculate the frequency of an external signal. STM8S and STM32 Timers are compatible and the Firmwares are 99% similar. link is :http://www.st.com/products/support/micro/files/stm8sfwlib.zip
Amin [ This message was edited by: amin.agina on 17-05-2009 19:34 ]