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.

COMPxOUT and GPIO

Hi TI Folks

Im using the comparators on the F2802x device.

I intend to use the digital compare and event triggering etc, but also the COMPxOUT on the GPIO. The info on using the comparators output on the GPIO is pretty light, especially in light of the diagram, fig 39, in the ADC & comparator reference guide, SPRUGE5D, which seems to suggest that COMPxTRIP must pass through the PWM modue...

so a couple of initial questions arise:

In all other documentation I have seen so far (such as SPRUGE9E) the comparator output is referred to as COMPxOUT. Is this the same as COMPxTRIP shown in fig 39 - SPRUGE5D as it does not show a COMPxOUT??

Other than setting the appropriate bit of GPBMUX1 (bit.GPIO34) to 0x01; isthere any further requirement to have COMPxTRIP output on GPIO34??

Finally, again in figure 39 in SPRUGE5D, COMPxTRIP is shownas being connected to the PWM ET, yet in the PWM documentation (SPRUGE9E) the connection is shown to the digital compare sub-module instead... which is it?

  • Hi Toby,

    Did you go through: SPRUGE5F doc. This is specially for ADCs and Comparators.

    I hope it clears your doubts.

    http://www.ti.com/general/docs/lit/getliterature.tsp?literatureNumber=spruge5f&fileType=pdf

    Regards,

    Gautam

  • Hi Gautam

    This is the document I was referring to. Look at figure 39 on page 44. The comparator output is named as COMPxTRIP and connects to the PWM Event Trigger and then from there to the GPIO. 

    Whereas the documents for the PWM and GPIO refer only to COMPxOUT and suggest that it connects to the PWM Digital Compare and the GPIO directly...

    Which is it?

  • Toby,

    The one in SPRUGE5F is the correct one and please follow the documents meant for respective peripherals.

    Regards,

    Gautam

  • Hi Gautam

    Maybe I am not communicating this correctly. You said 

    " please follow the documents meant for respective peripherals"

    This is what I am attempting to do...

    The comparator block connects to the PWM block therefore I am looking for the signal that is output from the comparator block (i.e. COMPxTRIP) in the PWM documentation, but instead I only find COMPxOUT...

    This means that, following your advise that SPRUGE5 is correct, COMPxOUT is incorrect in all documents mention (eg. SPRUGE9, SPRUFN3, etc) ... is that the case?

  • Hi Toby,

    In SPRUGE5, there's no mention of COMPxOUT but COMPxTRIP instead as below:

    Also, I did check the PWM documentation ie SPRUGE9E

    Here, COMPxTRIP is absent and COMPOUTx is mentioned everywhere i.e.

    Finally, what we can conclude is both of these inputs i.e. COMPxTRIP and COMPOUTx are functionally the same. I know, all of these seem to be bit confusing. I, myself have experienced such redundancies. I always see to it that the document meant for the respective peripherals is the perfect one for eg. in your case for Comparator peripheral SPRUGE5F is the doc. meant for F28027 controller.

    Regards,

    Gautam

  • Toby,

    You should be able to bring the COMPxOUT signal out to a pin by configuring the GPIO MUX register without explicitly configuring the EPWM DC module.

    -Tommy

  • Thanks Tommy :)