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.

TMS320F28384S-Q1: TMS320F28384S-Q1

Part Number: TMS320F28384S-Q1
Other Parts Discussed in Thread: TMS320F28384S, C2000WARE

Hello.

I'm Kihoon Kim of Seoul National University of Science and Technology.

Now I'm using TMS320F28384S for developing On-board chargers.

But I have a problem.

If I turn on the control board, all PWM outputs send out high signal during very short period.

In this period, if there are voltage in DC Link or somewhere, it occurs arm-short.

GPIO 72 and 84 are pull-up and we are using flash booting.

Can I solve it?

I look forward to your reply.

Thanks.

Best regards.

  • Hi,

    Are you using TI EVM or your custom board? The active high is observed during device boot or after PWM is configured?

    Regards, Santosh

  • Hi.

    Thank you for your answering.

    Now, I'm using my custom board.

    And the active high is observed after PWM is configured.

    Is there anything suspicious?

    Best regards.

  • Hi,

    Do you have TI EVM, and can you run one of the ePWM example from C2000Ware SDK? Do you see the same behavior?

    Regards, Santosh

  • Sorry.

    I don't have TI EVM. 

    The bottom part is the problematic part of the code.

    conf_ePWM_LOW (3, 60.0); 

    void conf_ePWM_LOW(Uint16 ch, float32 freq)
    {
    // Set actions
    ePWM_Regs[ch]->AQCTLA.bit.ZRO = AQ_CLEAR;
    ePWM_Regs[ch]->AQCTLA.bit.CAU = AQ_SET;
    ePWM_Regs[ch]->AQCTLB.bit.ZRO = AQ_CLEAR;
    ePWM_Regs[ch]->AQCTLB.bit.CAU = AQ_SET;

    if(ch==3){
    ePWM_Regs[ch]->TBCTL.bit.PHSEN = TB_DISABLE;
    ePWM_Regs[ch]->EPWMSYNCOUTEN.bit.ZEROEN = SYNC_OUT_SRC_ENABLE;

    ePWM_Regs[ch]->TBPHS.bit.TBPHS = 0;
    }
    else if(ch!=3){
    ePWM_Regs[ch]->TBCTL.bit.PHSEN = TB_ENABLE;
    ePWM_Regs[ch]->EPWMSYNCINSEL.bit.SEL = SYNC_IN_SRC_SYNCOUT_EPWM4;
    }


    // Setup TBCLK
    ePWM_Regs[ch]->TBCTL.bit.CTRMODE = TB_COUNT_UP; // Count up
    ePWM_Regs[ch]->TBCTL.bit.PRDLD = TB_SHADOW;
    ePWM_Regs[ch]->TBCTL.bit.HSPCLKDIV = TB_DIV1;
    //ePWM_Regs[ch]->TBCTL.bit.CLKDIV = TB_DIV1; //0b110; // /64


    ePWM_Regs[ch]->CMPCTL.bit.SHDWAMODE = CC_IMMEDIATE; // Load registers every ZERO
    ePWM_Regs[ch]->CMPCTL.bit.SHDWBMODE = CC_IMMEDIATE;
    //ePWM_Regs[ch]->CMPCTL.bit.LOADAMODE = CC_CTR_ZERO;
    //ePWM_Regs[ch]->CMPCTL.bit.LOADBMODE = CC_CTR_ZERO;

    ePWM_Regs[ch]->DBCTL.bit.IN_MODE = DBA_RED_DBB_FED;
    //ePWM_Regs[ch]->DBCTL.bit.POLSEL = DB_ACTV_HI;
    ePWM_Regs[ch]->DBCTL.bit.POLSEL = DB_ACTV_HIC;
    ePWM_Regs[ch]->DBCTL.bit.OUT_MODE = DB_FULL_ENABLE; //deadtime

    ePWM_Regs[ch]->AQSFRC.bit.RLDCSF = 3; //immediate

    updateDuty(ch, 0.0);
    updatePhase(ch, 0.0);
    updateFreq(ch, freq);
    updateDeadtime(ch, 0.0);
    }

    Can you find suspicious part?

    Best regards.

  • Hi,

    Do you have a oscilloscope capture which you can share indicating the brief high?

    Regards, Santosh

  • Hi.

    This is the oscilloscope capture.

    Best regards.

  • Hi,

    I am looping subject matter expert. Please expect response by tomorrow.

    Thanks & Regards,

    Santosh

  • Thank you.

    I look forward to your reply.

    Best regards.

  • Hello,

    When is the value for CMPA assigned? At a glance, my first instinct here would be that the CMPA value is not being assigned until after the clock has been enabled and the AQ is already configured. On reset, CMPA is assigned a value of 0h by default. This would mean, as soon as the clock begins, two events occur simultaneously- CTR=0 and CTR=CMPA (CAU)

    If we look at the AQ priority chart from your device's TRM-

    - we can see that when this happens, the AQ event for CAU would trigger, then immediately afterwards, the CTR=0 event would trigger, i.e. AQ_SET and then AQ_CLEAR. This is all intended behavior, but is obviously happening at an undesirable time.

    A safer implementation would be to refrain from assigning CTRMODE = TB_COUNT_UP until after all other configuration is completed. If this is the source of the issue, as I suspect, then this would avoid it entirely.

    Alternatively, implementations of ePWM often include disabling the ePWM peripheral's clock prior to initial configuration and re-enabling it immediately afterwards to avoid accidental ePWM events. For example, in [C2000Ware->Driverlib->f2838x->examples->c28x->epwm], the epwm_ex3_synchronization example has the following lines of code, with "Board_init()" containing the ePWM configuration functions:

    I hope this helps,

    Jason Osborn