Hello,
Some info about our design to understand the question:
- CPU runs @ 200MHz
- CPU timers 0 generates an interrupt at 10kHz so TBPRD was set at 20000
- EPWM instance is configured to generate a 20kHz PWM with counter in up-down mode so TBPRD was set at 5000
To check the synchronicity between our real-time interrupt and the PWM, we toggle a GPIO every cycle.
We were expecting our PWM signal to be synchronous with the GPIO, i.e. fixed offset in between both with obviously a little jitter.
However, in that configuration we observe that both are shifting one from the other over time.
This shifting disappears if we set the CPU timer 0 TBPRD register to 19999 which does not fully make sense wrt. the TRM.
Are our assumptions from the design at the top of the post correct ? Or did we miss something in the TRM.
Thanks,
Clément