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.

TMS320F280045: CMPSS triggers EPWM protection

Part Number: TMS320F280049

Hi Champs,

If the voltage on the comparator positive input is greater than the voltage on the negative input, it will set comparator output to 1 and set CTRIPH/L to trigger EPWM protection. This is the way we are used to.

I want to know if there is a way that EPWM protection is triggered only after the positive input of the comparator is greater than the negative input for multiple times. It means that EPWM protection is not triggered every CMPSS event, but EPWM protection is triggered after the Nth CMPSS event occurs. 

I'm not sure if my description is clear, I checked the CPMSS part and the EPWM part of the TRM, but I didn't find a way to achieve this function.

So I want to confirm the following two questions with you:

① I think CLB module can achieve this function, is my understanding correct? Do we have a demo that we can refer to for this function to be implemented by CLB?

② Is there a way to realize this function without CLB? Actually customer are evaluating C2000 device without CLB(not F280049).

Do you have any suggestions? Thanks!

Best,

Julia

  • Hi Julia,

    Thank you for your patience.

    I'll go over your question and get back to you shortly.

    Regards,

    Hadi

  • Julia,

    The functionality that you are asking can be achieved via Digital Compare submodule of EPWM. So, you don't need to use CLB module.

    Generally, signals from the analog comparator (COMP) module can be selected using the DCTRIPSEL bits to generate the Digital Compare A High and Low (DCAH/L) and Digital Compare B High and Low (DCBH/L) signals. Then, the configuration of the TZDCSEL register qualifies the actions on the selected DCAH/L and DCBH/L signals, which generate the DCAEVT1/2 and DCBEVT1/2 events (Event Qualification A and B). The DCAEVT1/2 and DCBEVT1/2 events can then be filtered to provide a filtered version of the event signals (DCEVTFILT).

    For more information about this, you can refer to "section 18.11.4.2 Event Filtering" in TRM.

    Regards,

    Hadi

  • Hi Hadi,

    Thanks for your reply! I checked what you said about "section 18.11.4.2 Event Filtering", it might be a bit different from what customer requested.

    Event Filtering looks like blanking events within a certain period of time. What customer needs is that the CMPSS event is triggered multiple times before triggering the protection event. (the time interval may be short or long)

    Do you have any suggestions? Thanks!

    Best,

    Julia

  • Hi Julia,

    You can use the Edge Filter Count to filter number of triggers coming from CMPSS. There is an example "epwm_ex7_edge_filter" explaining how to set the configurations for counting edges of the DCBEVT2 and generate a signal to to trip the ePWM on the Nth edge of DCBEVT2.

    Regards,

    Hadi

  • Hi Hadi,

    Thanks for the info, it is clear!

    Best, 

    Julia