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.

TMS320F2800157-Q1: EPWM1 PWMSYNC Source Select & HRPWM

Part Number: TMS320F2800157-Q1
Other Parts Discussed in Thread: SYSCONFIG, C2000WARE

Hi,

 

My customer is using EPWM1 with EPWM Time base configuration – PWMSYNC Source Select : Counter equals zero.

With this setting, following source code is generated.

 

file: Board.c

EPWM_setSyncPulseSource(myEPWM1_BASE, HRPWM_PWMSYNC_SOURCE_ZERO);

 

However, when enabling HRPWM – Enable HRPWM Support : ON, the above line was removed from Board.c, and it seems like the PWMSYNC is working with “Counter equals period” as a default setting.

 

For the time being, they are using EPWM1 with HRPWM disabled, but they want to enable HWPWM.

How to achieve them in SysConfig configuration?

 

Regards,

-Shibata

  • Hi Taro,

    Apologies for the delayed response. For selecting the SYNCOUT pulse to synchronize other EPWMs, the "Sync Out Pulse" option should be used. The "PWMSYNC Source Select" option controls the HRPCTL register, which is used to generate a EPWMSYNCPER signal to synchronize the CMPSS module. When HRPWM is enabled, this option is disabled in SysConfig.

    Let me know if you have any other questions.

    Thank you,

    Luke

  • Hi Luke,

     

    > For selecting the SYNCOUT pulse to synchronize other EPWMs, the "Sync Out Pulse" option should be used. The "PWMSYNC Source Select" option controls the HRPCTL register, which is used to generate a EPWMSYNCPER signal to synchronize the CMPSS module. 

     

    What customer want is to generate a EPWMSYNCPER signal to synchronize the CMPSS module.

    So, it’s the right way to generate the code calling function EPWM_setSyncPulseSource()?

     

    > When HRPWM is enabled, this option is disabled in SysConfig.

     

    Please clarify, it is a restriction in SysConfig implementation, or HW specification?

     

     

    Let me ask another question.

    I found that customer is still using C200Ware 4.03.00.00 EA3.

    In this version the SysConfig parameter “PWMSYNC Source Select” generates the code calling EPWM_setSyncPulseSource().

    But in 4.03.00.00, the parameter “PWMSYNC Source Select” does not generate the code calling EPWM_setSyncPulseSource().

    I suggested them to move to 4.03.00.00, but please let me know how to call EPWM_setSyncPulseSource() by SysConfig configuration in 4.03.00.00 or any other option for configuring HRPCTL register?

     

    Regards,

    -Shibata

  • Hi Taro,

    This may be a bug in SysConfig, I have checked the TRM and have found no regard to limitations on generating a EPWMxSYNCPER signal when using HRPWM. I will verify this with our other EPWM experts and get back to you later today.

    Thank you,

    Luke

  • Hi Taro,

    I've confirmed with our other EPWM experts that this is a SysConfig issue. There is no HW limitation to configuring EPWMxSYNCPER when using HRPWM. We will fix this in the next C2000Ware release scheduled for mid-July.

    As a workaround for now, you may manually call EPWM_setSyncPulseSource immediately after calling Board_Init() in your main function. Let me know if you have any other questions.

  • Hi Luke,

    Thanks for the clarification.

    I will check the workaround and get back to you if any.

    Regards,

    -Shibata

  • Okay thanks Taro, let me know if there is any issue with the workaround.