2025-08-15 11:36 AM
Hello,
I’m currently working on a project to synchronize two ICG and ECG devices. Although they require different oscillator frequencies—and therefore use different timers—both timers are driven by the same APB1 clock.
I have searched the reference manuals but could not find any information on error introduced by the divider itself. Any documentation or insight on timer-divider accuracy would be greatly appreciated.
Thank you!
2025-08-15 1:07 PM
Phase offset is difficult to define when you have two different frequencies. So let’s imagine you have two timers clocked off APB1 but set the division ratios equal. Can they be different phases? Most definitely YES. It very much depends how many ticks elapsed between setting one timer going and setting the other going.
But if that’s a problem for you, then you can generally arrange for the two timers to start counting from a common trigger so they will be exactly in phase.
And ghe case where they are different frequencies? If there’s a simple ratio between them e.g. 2:1 then phase is meaningful.
As to clock accuracy, the division ratios equal is exactly what you program, so the frequency stability will be as good as the APB1 clock, which is as good as whatever crystal or internal oscillator is used to generate it. And accuracy also as good - providing that the division ratio works out exactly; otherwise you’ll have an error
2025-08-15 1:15 PM
> Phase offset
It depends. If one frequency is a multiple of the other (say, 100 Hz and 200 Hz), then, yes, they will maintain a fixed phase relationship. Otherwise, no. Picture a 100 Hz signal and a 110 Hz signal, for example.
> Divider Accuracy
Yes - timer's output freq should have the same accuracy as the timer's clock source.