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.

TMS320F280049C: Missing CMPC event in PWM setup

Part Number: TMS320F280049C

Tool/software:

Hi experts,

My customer is using ePWM4 CMPC event to trigger CLA. 

The ePWM4 is sync with ePWM1. ePWM4 has a phase load enabled as 2 and the CMPC is set as 1.

Below is the detailed configuration.

They have an issue that once they trigger an over voltage TZ (Via AQ Force pull), the CLA task won't be triggered anymore.

The CLA is triggered by CTR=CMPC in ePWM4, so we checked the CMPC event flag, and it's not set.

(Since it's running with power stage, they can only read the register using a host, here they read the CMPC flag at 0x43A8 and finds that it's 0x8, the flag is not set)

They also use the same method to read CTR to see if it would equal to 1. Since CTR is changing continuously, they read it for 3000 times (PRD is 599) and use excel to filter it. In the below picture, you can see the TBCTR is on the second column and is changing randomly (expected), but as they turn on the filter, there is no "1" in these random values. 

At this point, we conclude that CTR never reaches 1, so the ePWM4 CTR=CMPC never happened.

Since the ePWM4 phase load is enable as “2”, it may seem reasonable that CTR never equals to 1.

However, the CLA can be triggered normally before the over voltage. After the over voltage, the CLA cannot be triggered, however, if we manually set the CMPC event flag, the CLA can be triggered normally again in next cycles.

The CLA use calculates the control loop and clear the CMPC event flag.

Although it might be unreasonable to set CMPC=1 when the phase load is set as 2, I cannot explain why it works normally at first but stop working only when overvoltage occurs and restore working after triggering the CLA by manually setting the CMPC flag for one time.

Could you please help providing an explanation?

Regards,

Hang

  • Hi Hang,

    Apologies for the delay. Do you have more information on when in the code this TZ force is happening through the AQ force? Can I please see the code that does this logic?

    Are the EPWMs expected to go low with this AQ force? It would be good to see how this is getting cleared as well. 

    They have an issue that once they trigger an over voltage TZ (Via AQ Force pull), the CLA task won't be triggered anymore.

    Best Regards,

    Marlyn