This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Code Composer Studio
Hi all,
I can generate required phase shift between two signals of different EPWM channel. For example, I can generate a phase shift between EPWM 1 and EPWM 2 channel. This code works fine.
Now I am wanting to introduce phase shift between signal from same EPWM channel. For example. I require a phase shift between EPWM1A and EPWM 1B.
Con anyone please help me how can this be done?
Regards,
Haque
Hi Haque,
There is not a built in method for doing phase shift between EPWM channels of the same module as there is with separate EPWM modules.
You would need to use different compare values and action qualifier events to achieve it within the same module. The easiest way to achieve this would be using up-down count mode. This is because you will essentially have more compare events because you can create different actions for CMPA/B when the counter is counting up and separate actions when the counter is counting down.
Regards,
Kris
Hi Haque,
Sorry for the late reply.
"Now what I need is to vary the phase shift between the modules (not fixed) and I think I need to update the phase shift register (EPwm1Regs.TBPHS.bit.TBPHS)."
Yes, you are right. You need to update the TBPHS in your ISR.
I have two suggestions:
1. Since you are using up-down count mode, you need to be careful on setting the PHSDIR register.
2. Also please pay attention to the comparator value during the transition, sometimes it needs to be updated together with the TBPHS in case of missing compare events. You can refer to the thread below and the phase shift full bridge application report which utilizes the variable TBPHS. There is also a HVPSFB project in the controlSUIT for your reference.
Thanks.
Best regards,
Chen