Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

TMS320F28377S: Phase differences problem between ePWM1A and ePWM1B

$
0
0

Part Number: TMS320F28377S

Hi Evereybody,

i try to use ePWM1A and ePWM1B output. when i use them constatly ,there is not any problem.

BUT when i active or passive them there is a problem. i try to explain with picture.

my frequency is 16kHz for ePWM1A and ePWM1B. but i can not use them with together. just one of them can have output.

At t1 : while ePWM1A is cleared ,ePWM1B is set.

At t2: while ePWM1B is cleared ,ePWM1A is set.BUT as you see on picture 1 and 2 are not equal eachother. 2 is just half period, but 1 is one and hald peiod...

and this a problem on my application and i can not understand? why this is happening?

in program i am doing in same place set and clear...

my PWM init code:

    EPwm1Regs.TBPRD = Period;
    EPwm1Regs.CMPA.bit.CMPA= 100;
    EPwm1Regs.CMPB.bit.CMPB = Period-100;
    EPwm1Regs.TBPHS.bit.TBPHS = 0;
    EPwm1Regs.TBCTR = 0x0000;
    EPwm1Regs.TBCTL.bit.CTRMODE = TB_COUNT_UPDOWN;
    EPwm1Regs.TBCTL.bit.PHSEN = TB_DISABLE;
    EPwm1Regs.TBCTL.bit.PRDLD = TB_SHADOW;
    EPwm1Regs.TBCTL.bit.SYNCOSEL = TB_CTR_ZERO;//  Master EPWM1A
    EPwm1Regs.TBCTL.bit.HSPCLKDIV = TB_DIV1;
    EPwm1Regs.TBCTL.bit.CLKDIV = TB_DIV1;
    EPwm1Regs.CMPCTL.bit.SHDWAMODE = CC_IMMEDIATE;
    EPwm1Regs.CMPCTL.bit.SHDWBMODE = CC_SHADOW;
    EPwm1Regs.CMPCTL.bit.LOADAMODE = CC_CTR_ZERO_PRD;
    EPwm1Regs.CMPCTL.bit.LOADBMODE = CC_CTR_ZERO_PRD;

    EPwm1Regs.AQCTLA.bit.CAU = AQ_SET;
    EPwm1Regs.AQCTLA.bit.CAD = AQ_CLEAR;

    EPwm1Regs.AQCTLB.bit.CBU = AQ_CLEAR;
    EPwm1Regs.AQCTLB.bit.CBD = AQ_SET;


Viewing all articles
Browse latest Browse all 262198

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>