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.

RTOS/AM5728: PWM issues

Part Number: AM5728

Tool/software: TI-RTOS

Hi am using CSL library to generate PWM pulse of high frequency. Am using PWM3 for this and able to generate pulses of required frequency and duty cycle. But not able to create 180 phase shift between two pulses(EPWM3A & EPWM3B). Also able to create deadband between two pulses

Thanks

Akash

  • Hi Akash,

    We are looking into your question and will get back with you in the next day or two.

    Regards,
    Melissa
  • Hi Melissa.

      Is there anybody look into this issue ??

  • Hi Akash,

    The UP-DOWN count mode can be used to create 180 phase shift between EPWM3A & EPWM3B.  For example, you can use CNT = ZERO to trigger EPWMxA high and then CNT = PRD to trigger EPWMxB high.  The CMPA and CMPB can then be used to set the EPWMxA and EPWMxB pulse width.  (Note in order to preserve your desired frequency, EPWM_TBPRD should be set at half of your desired period.)

    The following registers are used to configure the PWM dead-band.  The dead-band generator is described in section 29.2.2.6 “ePWM Dead-Band Generator (DB) Submodule” of the AM572x TRM.  

    - EPWM_DBCTL

    - EPWM_DBRED

    - EPWM_DBFED

    If you are still having issues implementing the dead-band, please provide more details about your use case and what you have tried.

    Regards,

    Melissa

  • Hi Melissa,
    My use case is to create a sine wave using two 180 degree phase shifted PWM pulses whose frequency and duty cycle can be varied. Duty cycle variation is in between 0 to 50 degrees and frequency approx 500KHz.
    Am able to control these two parameters and also able to control EPWM3A as per requirement, but not able to create EPWM3B which is same as EPWM3A just it is 180 phase shift to EPWM3A.

    I tried with deadband, UP-Down Configuration.
    Also tried with UP-Count with event enable to control EPWMB


    Can you please tell be setting of ACTION QUALIFIER module in both the cases.
  • Hi Akash,

    Below is a suggested configuration to achieve your desired phase shift:

    EPWM_TBCTL [CTRMODE] = Up-down-count mode

    EPWM_TBPRD [TBPRD] = Half of desired period/freq

    EPWM_CMPA = Whatever value you’re currently using

    EPWM_CMPB = (TBPRD – CMPA)

    EPWM_AQCTLA [ZRO] = Set (Force EPWMxA output high)

    EPWM_AQCTLA [CAU] = Clear (Force EPWMxA output low)

    EPWM_AQCTLB [PRD] = Set (Force EPWMxB output high)

    EPWM_AQCTLB [CBD] = Clear (Force EPWMxB output low)

    Regards,

    Melissa

  • Hi Melissa,

     Thanks this resolve my query completely its work