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.

TMS320F28377S: Frequency sweep using HRPWM period

Part Number: TMS320F28377S

Is it possible to use the HRPWM period control feature to create a frequency sweep from 30 MHz to 10 MHz. Understood the 150ps nominal HR period steps would not translate into a constant frequency step size. 

Considering the 100 MHz limit on EPWMCLK and the constraint against using HR control during the first and last 3 clock cycles of the PWM it does not appear to be possible  to use HRPWM above 100 MHz / 6 = 16.7 MHz. 

Steve

  • Hi Steve,

    I want to clarify how the EPWM and the HRPWM interact to make sure I'm understanding the question appropriately.

    The HRPWM is an extension of the EPWM. The HR registers (TBPRDHR, CMPAHR, CMPBHR) add resolution inbetween the values you have programmed in the EPWM registers (TBPRD, CMPA, CMPB).

    As a crude example, let's say your EPWMCLK frequency only allowed you to hit 10 MHz or 10.5 MHz, but you really wanted 10.25 MHz. You could use the HRPWM to increase the resolution to come closer to the target frequency. Once you went lower than the 10 MHz or greater than the 10.5 MHz, you would need to modify the EPWM register (TBPRD, CMPA, CMPB) as the HRPWM only fills in between the EPWM steps.

    In your example, the 30 MHz would pose a problem if the HRPWM resolution was required for the exact reason you mentioned. Please let me know if there's anything else we can help with.

    Regards,
    Kris
  • Kris, 

    Are you confirming that 16.7 MHz is the maximum PWM frequency that the HRPWM period feature can be used? I want to make sure I'm interpreting the TRM correctly.

    Steve

  • Steve,

    I believe you will need to have a value of TBPRD = 6 (TBCTR = 0, 1, 2 and TBCTR = 4,5,6 are not usable for HR). You could use HRPWM on TBCTR = 3 in this scenario. This would give you a maximum PWM frequency of 100/(6 + 1) = 14.3 MHz.

    Regards,
    Kris