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.

EPwm compare value

Hi,

I have an UP/DOWN Pwm that I change duty cycle for control. I was wondering if there was any problems setting a compare value equal to PRD or to zero to "force" a state, On or Off. I would like to avoid sofware force this way if it's possible. 

DSP used : F28377S

Thanks!

  • Hi Mosin,

    I was wondering if there was any problems setting a compare value equal to PRD or to zero to "force" a state, On or Off. I would like to avoid sofware force this way if it's possible.

    Yes, you might observe malfunctioning of the module. I've observed the same esp. when CMPA value equals 0. Please go through this extract and assign CMPx=1 and CMPx= TBPRD-1 for minimum and maximum duties.

    Regards,

    Gautam

  • Hi,

    thanks for pointing me this paragraph. I understand that that a very short pulse could not be problematic but I'm trying to avoid it... Anyway, I have dead times greater than 1 cycle so , if I set CMP  to PRD-1 or ZERO+1, it would be lost in the dead times. Would that still be safe?

    Thanks

  • Anyway, I have dead times greater than 1 cycle so , if I set CMP to PRD-1 or ZERO+1, it would be lost in the dead times. Would that still be safe?

    I didn't understand the above statement, can be a bit more clearer?

    Regards,
    Gautam
  • The dead times that we have are around 500ns. If I set the compare value to 1 or TBPRD-1, the resulting pulse wouldn't be visible because it would be smaller than the dead times. This would result in no pulse at all. My question is, would that still be a viable option.
  • This would result in no pulse at all.

    This would be a tricky situation right? You'll need to apply your saturation limits like 50 to 400 for a TBPRD of 450 etc.

    Regards,
    Gautam
  • Hi Gautam,

    That's what I'm looking for :)  I need to set some PWM to 1 or 0 at certain point. I was using software force before but I'm trying to streamline everything to use CMP values.

    Best regards,

  • Great!

    Goodluck & Regards,
    Gautam