AnsweredAssumed Answered

Timer-Synch + IRQ-Jitter

Question asked by Vinci on Oct 9, 2015
Latest reply on Oct 10, 2015 by Vinci

I've a question regarding the timer synchronization on an STM32L4. I've setup TIM1 and TIM8 to run in synch triggered by TIM2. To test the code I simply toggle a pin inside the TIM1 and TIM8 update interrupts. As far as I can tell it seems to work, but two things worry me.

When I debug the whole thing and set a breakpoint, the CNT register values of TIM1 and TIM8 are not equal, although my debug configuration definatly stops both timers when hitting the break. How could that be? I mean... they couldn't be off by much, judging from image #1... but still?

And the other thing I find kinda strange is that it takes the controller between 400 and 500ns (see image #2) just to end one timer IRQ and jump into the next one. Is this jitter normal? Both IRQs are temporarily set to the highest priority, nothing else could preempt them...