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.

TMS320F28379D: EPWM Initialization glitch

Part Number: TMS320F28379D

Hello,

I am programming an inverter with the TMS320F28379D. I need EPWM1A and EPWM1B to be complements of each other with an active high complementary dead-band. I almost have it working however there is a glitch with the EPWM1B right at the start when it goes high for one clock cycle. (See scope plot EPWM1A=yellow, EPWM1B=Blue) I would post the code but the inverter company wrote the code and gave it to me and I modified it so I don't own the copyright. What's the best way to debug this? I believe the cause might be that the epwm module is being configure as it's running. How do I configure the epwm and then start it?

Thanks,

Connor

  • Hi Conner,

    Is there a way you can please provide some pseudo code at least to understand what your initialization process looks like? 

    Something that you could try is forcing a software trip within your initialization to drive your outputs low while you finish initializing submodules like deadband etc and at the end clear the software trigger.

    Best Regards,

    Marlyn

  • Hi Connor, it is best practice to disable the clock to an IP while configuring it to prevent unexpected behavior.  Are you able to create an init routine that runs at boot instead of while the application is running?

    inline void InitEPwm(void)
    {
        // Disable clock on all ePWM peripherals.
        SysCtl_disablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC);
    
        //
        // Configure ePWM(s)
        //
    
     
        // Enable clock on all ePWM peripherals.
        SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC);
    }