Timer synchronization still has offset
Hello,
I am trying to synchronize two PWM outputs on an STM32H7: TIM4 channel 2 and TIM8 channel 3N.
To do this I am using the HAL synchronization functions, setting TIM4 up as master with "HAL_TIMEx_MasterConfigSynchronization" and TIM8 with "HAL_TIM_SlaveConfigSynchronization" in TRIGGER mode.
The timer synchronization works: I can see the rising edges of the PWMs are aligned on an o-scope, however there is still a 2.4 us offset between the rising edges of the two timers. Surprisingly the rising edge of the slave timer occurs first.
What is causing this offset, and is there a way to eliminate it?
My first thought is to set both timers up as slaves and have a separate timer as master to trigger them both to start. I am also wondering if this might be some artifact from synchronizing the outputs of a + channel with a - channel.
Any tips would be appreciated, thank you.