2010-01-14 06:55 PM
Timing of Input Pulses
2011-05-17 04:38 AM
I am a newby on the ST32. Trying to measure the time between input pulses, triggered as falling edge on a single port. Having a bit of difficulty understanding the capture and compare setup and how exactly to do it.
Does the counter always start from 0 and then stop at the next falling (if so selected) edge or does one have to compare two count values and look at the difference to work out the time span? Any help greatly appreciated. Regards Nick2011-05-17 04:38 AM
Hi Nick,
Did you already checked the STM32 firmware library examples? They provide an example of Input Capture that, I think, fits exactly your needs. The link if you don't have it:http://www.st.com/stonline/products/support/micro/files/stm32f10x_stdperiph_lib.zip
The example is in the following path: STM32F10x_StdPeriph_Lib\Project\STM32F10x_StdPeriph_Examples\TIM\InputCapture Good Luck and regards :)2011-05-17 04:38 AM
Hi
Many thanks - am looking at Example6 - hope I am on the right track here? The other thing I thought of was to start a counter when a rising edge is detected and stop it on the next rising edge??? Is this workable? Regards Nick