TMS320F280039C-Q1: EPWM stuck with the below AQ configuration

Part Number: TMS320F280039C-Q1

Tool/software:

HI Expert

I want to find the configuration that CTR in up and down mode, it can both generate 50% with " CTR=PRD/ CTR = ZERO" signal and the central symmetry with CTR value with "CAU / CAD"

So I wrote the PWM AQ configuration below:

EPWM_setActionQualifierAction(DEVICE_EPWM_LLC_CD_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_PERIOD);
EPWM_setActionQualifierAction(DEVICE_EPWM_LLC_CD_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_ZERO);
EPWM_setActionQualifierAction(DEVICE_EPWM_LLC_CD_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA);
EPWM_setActionQualifierAction(DEVICE_EPWM_LLC_CD_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_DOWN_CMPA);
The CTR mode set to up and down, CTR = 1000 I do the test below:
1. block the code below:
EPWM_setActionQualifierAction(DEVICE_EPWM_LLC_CD_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_HIGH, EPWM_AQ_OUTPUT_ON_TIMEBASE_UP_CMPA);
EPWM_setActionQualifierAction(DEVICE_EPWM_LLC_CD_BASE, EPWM_AQ_OUTPUT_A, EPWM_AQ_OUTPUT_LOW, EPWM_AQ_OUTPUT_ON_TIMEBASE_DOWN_CMPA);
the 50% PWM can be generated 
2. set CMPA = 500 which is <CTR
the 50% PWM can be generated, which is central symmetry with CTR = 1000
3. set CMPA = 1500, which is > CTR
PWM stuck, no wave in output pin.
I reviewed the TRM, it mentioned when I want to generate the 0% PWM I need to set CMPA = PRD - 1, but not PRD. But TRM does not mention that PWM will stuck once I set CMPA = PRD. 
So my code stuck in in the step3, could you recommend a good way to reach my aim?
Thanks
Joe
  • Hi Joe,

    Can you please describe what you are trying to do with step 3? If CMPA is greater than the period value, the up-count event will not occur. The down-count event will occur when the timebase counter equals PRD.

    In your configuration the EPWM is set to output LOW on a zero match, then it will be set to LOW again due to the CMPA down event (which will happen at PRD because CMPA > PRD). This is why your EPWM output is seen as "no output" when you set CMPA to 1500.

    Best Regards,
    Marlyn

  • Hi Marlyn

    Nice to see you in E2E, the explanation of step 3 is that I want to ignore the CMPA to trigger action. I hope with the configuration I can realize the 50% duty cycle when set CMPA>CTR and variable central symmetry pulse when 0<CMPA<CTR.

    Thanks

    Joe

  • Hi Joe,

    Thank you, nice to see you on E2E as well. Can you please share a diagram of the end goal? I am confused as to why step 3 is needed when step 1 and step 2 gives a 50% output. 

    Best Regards,

    Marlyn