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.

TMS320F280049: HRPWM CMPAHR did not work as expected

Part Number: TMS320F280049
Other Parts Discussed in Thread: C2000WARE

Hi Expert,

 My customer use updown mode for generating HRPWM, they do the modification from the below example, they do the AQ configuration as below, and found that duty cycle for PWM1B is correct, but there is some problem for PWM1A.

        C:\ti\c2000\C2000Ware_3_02_00_00\device_support\f28004x\examples\hrpwm

            EPWM_setActionQualifierAction(EPWM1_BASE, EPWM_AQ_OUTPUT_A,

                                          EPWM_AQ_OUTPUT_HIGH,

                                          EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA);

            EPWM_setActionQualifierAction(EPWM1_BASE, EPWM_AQ_OUTPUT_A,

                                          EPWM_AQ_OUTPUT_LOW,

                                          EPWM_AQ_OUTPUT_ON_TIMEBASE_PERIOD);

 

           // EPWM_setActionQualifierAction(EPWM1_BASE, EPWM_AQ_OUTPUT_B,

           //                               EPWM_AQ_OUTPUT_LOW,

           //                               EPWM_AQ_OUTPUT_ON_TIMEBASE_PERIOD);

            EPWM_setActionQualifierAction(EPWM1_BASE, EPWM_AQ_OUTPUT_B,

                                          EPWM_AQ_OUTPUT_HIGH,

                                          EPWM_AQ_OUTPUT_ON_TIMEBASE_DOWN_CMPB);

            EPWM_setActionQualifierAction(EPWM1_BASE, EPWM_AQ_OUTPUT_B,

                                          EPWM_AQ_OUTPUT_LOW,

                                          EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);

they do the test to get the relationship between the output duty cycle and CMPA, CMPAHR as below, and the duty cycle for PWM1A is not correct as the red mark.

when CMPA increase from 78 to 80, the duty cycle decreased which is correct as expected.

but when CMPA is 79, as CMPAHR value increase, the duty cycle measured is also increased, which is not correct as expected,

Any suggestion for this? I post the code here for more details.

https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/171/Code_5F00_test.7z

  • Hi Expert,

    customer did more test for different AQ configuration,

    If set low for PWM zero event, high for CMPA_UP event, then output is NOT correct.

    if set high for PWM zero event, lowfor CMPA_UP event, then output is correct.

    below are the test result for different AQ configuration:

  • Hi,

    There is a limitation on edge placement for the 3 cycles around zero and period events. HR will not work as expected during the 3 cycles.
    Refer to "18.15.1.5.3 Duty Cycle Range Limitation" section of the device TRM.

  • Hi Subrahmanya,

    we know this limitation, this limitation only take effect when duty cycle is close to 0 or close 100%,

    but what customer did the test is around 20% or 80% duty cycle,  CMPA is 79 and TBPRD is 200, which is far away from 3 cycles around zero and period event.

    could you help explain why the result is different when set different AQ as below? and any suggestion for customer? do they have to change the AQ configuration that remove zero or period event? Thanks.

    If set low for PWM zero event, high for CMPA_UP event, then output is NOT correct.

    if set high for PWM zero event, low for CMPA_UP event, then output is correct.

     

  • Hi,


    we know this limitation, this limitation only take effect when duty cycle is close to 0 or close 100%,

    this is not correct. It's not related to the duty cycle. It's about the edge placement. Refer to "18.15.1.5.3 Duty Cycle Range Limitation" section of the device TRM. Irrespective of what the duty cycle is, still the edge placement, if edge occurs at zero or period.