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.

TMS320F28377D: Unexpected current in pwm

Part Number: TMS320F28377D

Hi expert,

My customer is using 377d in industry inverter with an issue, could you help to give some advice? Thanks 

In the PCS100kW INPC topology wave, when multiple DSPS are synchronizing carriers, the positive and negative half-cycle wave switching occurs, and the power frequency tube conducts half a switching cycle more than one time, resulting in excessive current



pwm code

void Int_PWMGenerator(UTILS_SVPWM_TYPE *pstPwmForNpcDataType)
{
HWREGH((EPWM1_BASE + (EPWM_O_CMPA + (uint16_t)EPWM_COUNTER_COMPARE_A)) + 0x1U) = pstPwmForNpcDataType->uiPwmCmpA;
HWREGH((EPWM2_BASE + (EPWM_O_CMPA + (uint16_t)EPWM_COUNTER_COMPARE_A)) + 0x1U) = pstPwmForNpcDataType->uiPwmCmpB;
HWREGH((EPWM3_BASE + (EPWM_O_CMPA + (uint16_t)EPWM_COUNTER_COMPARE_A)) + 0x1U) = pstPwmForNpcDataType->uiPwmCmpC;

/* Generate pwm */
if(0 == pstPwmForNpcDataType->uiPwmCmpD)
{
#pragma CHECK_MISRA("-12.4")
if((0 != pstPwmForNpcDataType->uiDutyCmpD) && ((HWREGH(EPWM1_BASE + EPWM_O_TBSTS) & EPWM_O_TBSTS_CTRDIR) == EPWM_AQ_COUNTING_DN))/* EPwm1Regs.TBSTS.bit.CTRDIR == TB_DOWN */
{
pstPwmForNpcDataType->uiPwmCmpD = pstPwmForNpcDataType->uiDutyCmpD;
HWREGH(EPWM1_BASE + EPWM_O_AQCTLB) = ((HWREGH(EPWM1_BASE + EPWM_O_AQCTLB) & ~EPWM_AQCTLB_ZRO_M) | ((uint16_t)EPWM_AQ_SW_OUTPUT_HIGH << EPWM_AQCTLB_ZRO_S));
}
else
{
pstPwmForNpcDataType->uiPwmCmpD = pstPwmForNpcDataType->uiDutyCmpD;
HWREGH(EPWM1_BASE + EPWM_O_AQCTLB) = ((HWREGH(EPWM1_BASE + EPWM_O_AQCTLB) & ~EPWM_AQCTLB_CBD_M) | ((uint16_t)EPWM_AQ_SW_OUTPUT_HIGH << EPWM_AQCTLB_CBD_S));
}
}
else if(pstPwmForNpcDataType->ulPwmPrd == pstPwmForNpcDataType->uiPwmCmpD)
{
if((pstPwmForNpcDataType->ulPwmPrd != pstPwmForNpcDataType->uiDutyCmpD) && ((HWREGH(EPWM1_BASE + EPWM_O_TBSTS) & EPWM_O_TBSTS_CTRDIR) == EPWM_AQ_COUNTING_UP))/* (EPwm1Regs.TBSTS.bit.CTRDIR == TB_UP) */
{
pstPwmForNpcDataType->uiPwmCmpD = pstPwmForNpcDataType->uiDutyCmpD;
HWREGH(EPWM1_BASE + EPWM_O_AQCTLB) = ((HWREGH(EPWM1_BASE + EPWM_O_AQCTLB) & ~EPWM_AQCTLB_PRD_M) | ((uint16_t)EPWM_AQ_SW_OUTPUT_LOW << EPWM_AQCTLB_PRD_S));
}
else
{
pstPwmForNpcDataType->uiPwmCmpD = pstPwmForNpcDataType->uiDutyCmpD;
HWREGH(EPWM1_BASE + EPWM_O_AQCTLB) = ((HWREGH(EPWM1_BASE + EPWM_O_AQCTLB) & ~EPWM_

BR

Chi