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.

TMS320F28375S: HRPWM in up-down mode

Part Number: TMS320F28375S
Other Parts Discussed in Thread: C2000WARE

Tool/software:

Good morning, I have carefully read the TRM of TMS320F2837xS (SPRUHX5I), but I did not understand if and how it is possible to generate a high resolution PWM pulse (HRPWM) in up-down mode, while keeping it centered. I kindly ask for your help. Thank you, best regards.
  • Hello,

    Yes, it is possible and actually generally recommended you use up-down count mode with the HRPWM pulse centered around the TBPRD value. Please refer to the examples in our C2000Ware SDK for HRPWM for sample configurations as well. Is this for HR duty cycle control?

    Best Regards,

    Allison

  • Hello,

    thanks for the references. I'll go read the documentation.

    Best Regards

  • Hello,
    I am thinking of using DBREDHR on one edge and CMPAHR on the other, so I can delay the edges independently and get a pulse centered on TBPRD.
    It is obviously necessary to set AQCTLA and CMPx appropriately so that Action Qualifier generates a pulse not centered on TBPRD. Note: I do not intend to use High-Resolution Period. Would this be an acceptable method?
    Thanks, best regards.

  • Hi Paolo,

    Apologies for the delay, please allow another day for me to check on this configuration. To clarify, would using only deadband RED and FED work for your application since the rising edge delay and falling edge delay can be independently controlled? Just wanted to be sure I understand your requirements. Feel free to elaborate a bit more or share a diagram of desired waveforms if you feel necessary. Also,, what frequency PWM are you using?

    Best Regards,

    Allison

  • Hi Allison,

    The PWM frequency is not very high (less than 20 kHz) but I would still like to test a finely controlled duty cycle, while keeping the final pulse centered on TBPRD. For this purpose I would like to generate a "coarse" pulse with Action Qualifier (CAU and CBD) and then delay the rising edge and falling edge independently via DBREDHR and CMPAHR respectively. I was wondering if this method would work or if the ePWM unit provides more 'direct' methods to achieve the same result (HRPWM pulse centered in up-down mode).

    No problem for the 'delay' and thanks for the help.
    Best regards.

  • Hi Paolo,

    Understood- thanks for the explanation. I also wanted to ensure you understand the below 2 points as sometimes there is confusion on using the CMPxHR values with EPWMxA and EPWMxB:

    • CMPAHR value will only be applied to EPWM channel A output
    • CMPBHR value will only be applied to EPWM channel B output

    And I confirmed you can use DBREDHR/CMPAHR as needed for your waveform. Just be sure the CMPAHR and DBREDHR/2 do not fall into the HR duty cycle limitation range (for example, the first 3 EPWMCLK cycles after the period starts) noted in the TRM:

    So to simplify, in your case you are using the following setup- is my understanding correct?

    Best Regards,

    Allison

  • Hi Allison,

    I confirm that it was clear to me that:
    CMPAHR value will only be applied to EPWM channel A output
    CMPBHR value will only be applied to EPWM channel B output

    The setup is what you described, but I specify that in Action Qualifier the falling edge is controlled by CMPB (CBD event), while the rising edge is controlled by CMPA (CAU event), otherwise the Action Qualifier output pulse would be centered and HRPWM would only produce a shift.

    Thanks again for the help.
    Best regards