Hello,
I have the need to change run-time the period of two syncronized EPwm,
but before to do this operation I have to force LOW out A and out B not immediately
but syncronously (for example "on event counter equals zero").
To force LOW out A and out B I use bit CSFA and CSFB in the AQCSFRC register.
To do this operation syncronously I use bit RLDCSF in the AQSFRC register:
Is there a problem:
when I write "1" to CSFA,CSFB register out A,B are not set to immediately to zero,
so I can't change EPwm period immediately.
If I want to change EPwm period I have to wait CSFX effect (i.e. out X forced LOW).
Is there a way to wait this event, for example ...
While(EPwmXRegs.XXXXX.bit.YYYY==1) asm(" nop");
For now I use this code but it is not the best
While(EPwmXRegs.TBCTR>4) asm(" nop");
Can some one help me ?