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: Difference between Digital compare High and Low.

Part Number: TMS320F280049C


Hi,

I am a bit confused regarding the use of Digital compare sub module. The digital compare sub module has DCOMPA H/L for PWM A and DCOMPB H/L for PWMB. So there is a high and low digital comparator for PWMA

Will the 2 events generated be the same:

1. When output of an analog comparator (CMPSS)  connected to high Digital comparator (DC in EPWM) and EVENT WHEN DCAH_LOW is selected

2. When output of the same analog comparator (CMPSS)  connected to low Digital comparator (DC in EPWM) and EVENT WHEN DCAL_LOW is selected


I could not find the internal block diagram of the digital compare module with the actual comparators connected in the reference manual, or am I overlooking something

Thanks

Royston

  • Let me review the TRM for this.
  • Royston,

    Sorry about the delay.
    I am a bit confused about your question and your wording. DC (digital compare) submodule has two parts, A and B. A is for EPWM output A and B is for EPWM ouput B. You also have DCAEVT1 and EVT2, two events you can use. Same for the B.

    CMPSS, the comparator module has Low and High (COMPL and COMPH). This can be used by the EPWM module and the DC submodule.

    There is no such thing as a "DCOMPA H/L", this is a mixture of DC (digital compare), COMP (as in Comparator), A/B (A/B from DC), and H/L (high low from CMPSS). If you can please clarify what exactly you mean that would allow me to provide you with more info.

    Sorry about the delay again, I had to go through searching documents for DCOMPA H/L to see if there was something I was missing so I didnt provide incorrect information to you.

    Nima Eskandari
  • Hi Nima,

    Thank you for your reply. I was a bit confused and and still am.

    I have routed output of COMP6H to the Trip 4 input using the ePWMXBAR. This Trip Input 4 is fed as an input to the DC compare unit.

    So as far as the DC unit would be able to see only the output of COMPH (single line) based on the configuration, am I right in understanding this? Or are you saying when the COMPH output is routed to EPWM XBAR, even the COMPL gets routed automatically to the DC unit?

    Now if this COMPH output is fed to DC compare, based on the TZDCSEL, what will the DCAEVT2 event generate for the different settings present in the TZDCSEL below. I am assuming that the COMPH is a single line of output fed to the DC compare unit using the PWMXBAR and TRIP input.

    Thank you

    Royston

  • Okay so on EPWM XBAR, you enable mux 10, and set TRIP4 input to be CMPSS COMP H output.

    So far good.

    Then you make the input to the Digital Compare to be TRIP4, and you want it connected to DCA L.

    So now, on the DC module, you have CMPSS COMP H as input to DIGITAL COMPARE DCA L.

    Also correct.

    Then you set the DCA OUTPUT 2 to trigger when DCA L goes high.

    Then you enable the interrupt for DCA EVENT 2.

    We have NOT done anything with CMPSS COMP L.

    As mentioned above, the DCA EVENT 2 is generated when DCAL is HIGH, which means when CMPSS COMPH is high you will get a trip zone event and an interrupt.

    I hope this explains everything.

    If you have more questions, please send a bulleted list of the questions.

    Thank you,

    Nima Eskandari

  • Hi Nima,

    Thank you for your reply. I understand we have not done anything with CMPSS COMP L. Which brings me to the original question I posted perhaps I should rephrase it as it wouldn't have been clear.

    As mentioned in your latest reply 

    "DCA EVENT 2 is generated when DCAL is HIGH, which means when CMPSS COMPH is high you will get a trip zone event and an interrupt."

     


    Let's consider another case, where DCA OUTPUT 2 is set to trigger when DCA H goes high. (code below). Now for this situation DCA EVENT 2 is generated when DCAH is HIGH, which means when CMPSS COMPH is high you will get a trip zone event and an interrupt. Am I correct?

     


    If the above statement is true then what is the difference between the DCA EVENT 2 generated for the 2 conditions mentioned below:

    1:

     

    2:

     

    Thank you

    Royston

  • You have routed your signal to DCAL , NOT DCAH. DCAH is connected to the defualt signal which I dont exactly know what it is.

    If you configure TRIPIN4 to go to DCAH, then you can use DCAH_HIGH to generate your event and I do not believe there would be a difference in those two setups as far as I know or at least for this application.

    Nima
  • "If you configure TRIPIN4 to go to DCAH, then you can use DCAH_HIGH to generate your event and I do not believe there would be a difference in those two setups as far as I know or at least for this application"

    Perfect, this clears a lot of things. Thank you for taking your time to clarify the same.