2011-07-28 01:24 AM
Hi,
I would like to mesure time between software events. I thought of using TIM17 channel 1 input capture mode and trigger it by software. But i have a problem, how can i configure it to ignore it's port (PB9) input data and just be activated by software? is it possible? Thanks - Udi.2011-07-28 04:53 AM
Typically you'd use a free running counter of some sort, depending on the granularity and period between measurements.
For seconds you have the RTC, you can get it to measure fractional seconds by playing with the prescaler. At seconds, the period is about 140 years as I recall. The TIMx timers can be set in simple counting modes, but the 16-bit width can be very limiting. The core cycle counter, part of the trace unit, is a 32-bit counter that clocks at SYSCLK, depending on the frequency you're looking at a resolution of several nanoseconds, and periods around a minute. You can also use SysTick to increment a software counter at say 1 millisecond, and get fractional ticks from core cycle counter.2011-08-01 12:45 AM