2014-02-23 04:00 PM
In my application, I'm using TIM3 to generate a square-wave signal which is triggered by an external trigger using input TIM3_CH2. The problem is that there is some jitter, i.e., the generated square wave signal is not well locked to the trigger input (the jitter is in the order of 80ns).
Could this problem be alleviated by using TIM1 instead of TIM3? I think this may be the case since TIM1 is connected to the 168MHz clock internally, while TIM3 runs at 84MHz. Also, is there any advantage of using the external trigger input instead of the timer input channel?2014-02-24 01:00 AM
Increased clock should definitively help. You can try that out quickly without changing the timer, going the other way, by decreasing the TIM3 clock frequency and check if the jitter increased accordingly.
However, I don't understand what's the source of that amount of jitter. There sure are resync circuits in way of CHn signal, but I don't believe they introduce more than 1/tclk=12ns of jitter... The rest - digital filter, edge detector - should be synchronous, i.e. it may introduce delay but not jitter. Without understanding what's the source of jitter, I don't quite think using ETR will help - I believe it has the same resync circuitry. OTOH, IIRC, the ETR inputs are always shared with CH inputs, so once you physically connect the input signal to such you can easily try both... The bottom line is, yes, ST might have documented the innards of TIM more thoroughly... JW