2016-03-10 02:11 PM
hello, please I need some help.
I want to measure the frequency of a continuous current motor. then to do this I use an infrared sensor. this sensor is linked to the ADC of the STM. each time the sensor makes a round , the infrared sensor sends a signal to the microcontrollers. so I want to measure the time between two signals arriving at the adc. so how can I use the timer to count this time .2016-03-10 04:09 PM
Set a timer in maximal mode, and use the Input Capture mode or PWM Input mode to timestamp or time the interval?
Both method have been covered here before. You don't measure a frequency, but if you configure the timer to count at 1 MHz, you will be able time intervals to 1 microsecond. You should probably be more specific about what part you are talking about, ST makes hundreds of different parts.2016-03-10 04:11 PM
If you have to read the ADC sample to threshold the signal, you could still use a free running maximal timer to pull time stamps for the ADC EOC, or TIM Trigger of the ADC
2016-03-10 05:04 PM