Hello,
I'm currently working on a project which is using the Piccolo F28069. I need eight PWM signals. Depending on the operation point I need a lagging or leading signal in respect to the first PWM signal.
I set up all the PWMs and it is working. The only problem I have now is when I change the phase shift during operation. I use a period of 900 (100kHz). If I want a lagging signal I change the phase shift register from 0 up to 225. If I need a leading signal I change the phase shift register from 900 down to 675.
Now when I start the PWM without any phase shift and then put a phase shift for a lagging signal in the following happens:
I get a period where the PWM signals that are being phase shifted will do nothing. This is not acceptible because this causes problems during the operation.
I already know the reason why this is happening (at least I think). But I don't know how to solve it.
I'm using 4 ePWM modules (ePWM1 - ePWM4). ePWM1 is the master while all the rest are slaves. According to the manual there is a delay between master and slaves of two cycles, which I can verify with debugging. The SYNCOSEL register is set to CTR_ZERO. So when the counter from the master is zero a sync signal will be generated. Now here lies the problem. Let's say I put a phase shift of 20 into the registers of ePWM3 and ePWM4. The counter of ePWM1 will get to zero and generate the pulse. At that time the counters of all the slave PWM modules are at 898. Writing the phase shift of 20 into the counters will now mess the one period up because we missed on counter event.
So...how can I solve that problem?
Thanks