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: Configuration of HRPWM

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Hello,

I need some help configuring/understanding HRPWM feature.

In one of the example given (hrpwm_ex2_slider), they have not used SFO library. My understanding for flow is as follows,

1) we need to enable HRPWM module and mode of operation other configuration related to it in initialization function. Also initialize EPWM module.

2) Now, to check the working, I will load the CMPA_HR (8 bit ). (are any other configuration required to check high resolution on duty cycle or this would work?)

But the problem is that, they have disabled the period control/phase control  by following lines of code, 

HRPWM_disablePeriodControl(myEPWM1_BASE);
HRPWM_disablePhaseShiftLoad(myEPWM1_BASE);

With this can I able to get high resolution in duty cycle control. 

Thanks & Regards,

Jainam

  • Hi Jainam,

    With this can I able to get high resolution in duty cycle control. 

    I encourage you to look at the duty examples if you'd like to use duty cycle control:

    C:\ti\c2000\C2000Ware_version\driverlib\f2837xd\examples\cpu1\hrpwm\hrpwm_ex1_duty_sfo

    C:\ti\c2000\C2000Ware_version\driverlib\f2837xd\examples\cpu1\hrpwm\hrpwm_ex4_duty_updown_sfo

    1) we need to enable HRPWM module and mode of operation other configuration related to it in initialization function. Also initialize EPWM module.

    2) Now, to check the working, I will load the CMPA_HR (8 bit ). (are any other configuration required to check high resolution on duty cycle or this would work?)

    I would recommend following the same format as presented in the examples I outlined above.

    Best Regards,

    Marlyn

  • Hi Marlyn,
    Thanks for the quick reply.

    I encourage you to look at the duty examples if you'd like to use duty cycle control:

    Yeah I have checked the duty cycle examples as well, but can't we control HRPWM on duty cycle without SFO (By providing default MEP steps and calculating CMPA_HR value and directly assigning the calculated value to CMP register? 

    Regards,
    Jainam

  • Hi Jainam,

    Yeah I have checked the duty cycle examples as well, but can't we control HRPWM on duty cycle without SFO (By providing default MEP steps and calculating CMPA_HR value and directly assigning the calculated value to CMP register? 

    Yes this is true. The Technical Reference Manual provides examples within the HRPWM section on how to perform these calculations and the needed steps to configure hrpwm.

    Best Regards,

    Marlyn