Other Parts Discussed in Thread: C2000WARE
Hi there, my first post on this forum :D
We are developing servo motor control and have roughly integrate ethercat slave stack code example with our existing motor control code for testing.
As we dig deeper we found that there is a slow phase shift between sync0 interrupt and MCU's own PWM interrupt signal.
The shift is causing problem to our applicaiton. We can move the position control loop to sync0 isr but we relied on a 8000Hz PWM for voltage and current control, out of sync between them will cause wired movement on motor.
So our question is, is there any way to control the phase shift? Can it be solved on software level or the hardware need to be modified?
Also we are puzzled, we have study the ethercat slave refernce design TMDSECATCNCD379D, there is no clock sync design within, but they must have the same problem for ethercat application right? Then how they do it?
Thanks for reading, any reply is greatly appreciated