Part Number: TMS320F280049
Hi,
The codes below are the DAB_pwmPhaseShiftPrimSec_ticks under the case of "leading phase":
DAB_phaseSyncPrimToSecCountDirection = EPWM_COUNT_MODE_UP_AFTER_SYNC;
DAB_pwmPhaseShiftPrimSec_ticks = DAB_pwmPhaseShiftPrimSec_ticks * -1;
DAB_pwmPhaseShiftPrimSec_HiResticks = ((uint16_t) 0xFF - ((uint16_t)(DAB_pwmPhaseShiftPrimSec_ticks & 0x0000FFFF)>>8));
DAB_pwmPhaseShiftPrimSec_ticks =
((DAB_pwmPhaseShiftPrimSec_ticks & 0xFFFF0000) + 0x10000) + (DAB_pwmPhaseShiftPrimSec_HiResticks << 8);
I see that it indicates that (integer+1).(255-decimal), but I cannot understand its principle. Hope you can help clarify, thanks.
BTW, in the isr1, the DAB_gvOut is restricted in [0,0.7] instead of [-0.7, 0.7].
Zijian