cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 less jitter when using TIM1 with external trigger instead of TM3?

mluessi
Associate II
Posted on February 24, 2014 at 01:00

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? 
1 REPLY 1
Posted on February 24, 2014 at 10:00

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