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.

can COMPxOUT trigger XINTx ?

Hello,

If I configure GPIO1 as comparator output COMP1OUT will it be able to trigger interrupt XINT1?

I found this post, but no answer there - http://e2e.ti.com/support/microcontrollers/c2000/f/171/p/242653/849143.aspx#849143

  • Hello Grigory!

    Why don't you like to apply solution mentioned in above link ("to wire COMPxOUT pin to a XINT capable pin")? Anyway if you initialize some GPIO as the output then you can not to use one for external interrupt. GPIO must be initialized as the input for XINT.

    Regards,

    Igor

  • Igor,

    I do not like solution with wiring because I will loose + 1 GPIO, for my project it is critical.

    According scheme on page 68  in SPRUFN3D - http://www.ti.com/lit/ug/sprufn3d/sprufn3d.pdf

    when I configure GPIO as Input/Output (GPADIR) - there is no influence on input circuit. I suppose I can read GPADAT with any GPADIR/GPAMUX configuration.

  • Hello Grigory!

    Grigory said:

    I suppose I can read GPADAT with any GPADIR/GPAMUX configuration.

    Yes, you can read output/input state, but I'm not sure that it is possible somehow be used for XINT. Through what mechanism? At least for me it is not clear...

    Regards,

    Igor

  • Grigory,

    I am pretty sure that the only way to do this inside the chip is to have the COMP tied to a Trip Zone for an ePWM module you aren't using. Then confiture the ePWM module to interrupt the CPU.  I'll forward to the experts, but I'm pretty sure this is the only way to do this on a 6x device.  I'll also get this feedback added as an enhancement to the module for future devices, it does make sense to have this capability.

     

  • Thank you Chris, will look forward expert`s answer.

  • from the expert:

    this is correct, the COMP can not create an interrupt on its own today.  You must go through a pin to XINT or use an ePWM module.

    Just to be clear, a spare PWM is not necessarily required. Different digital compare events (DCxEVT) can be generated inside the PWM module based on COMP outputs and/or TZ inputs. All you need is a spare DC event. Also, a pin is not sacrificed because COMP OUT is connected to PWMs internally.