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.

Interrupts from GPIOs

I'm trying to set up interrupts on the C28 side of the F28M35x. It seems that C28 GPIO pins cannot each be an interrupt, but rather are assigned to a set of available interrupts. Is this correct? It would differ from how it is configured on the M3 processor, where each pin can interrupt.

The following table lists 12 GPTRIP signals. Are these the available interrupts, to be assigned to particular GPIO pins? What is the difference between the XINT and TRIPIN signals?

  • Hi Michael,

    What is the difference between the XINT and TRIPIN signals?

    When XINT occurs (falling or rising edge), you can implement any custom ISR independent of any effects on peripherals.

    GPTRIP/TZx is specially meant for faults implementation. When this interrupt occurs (falling or rising edge), It effects PWMs way of functioning by stopping the pulse forever or just for one cycle etc.

    Regards,

    Gautam

  • Thanks Gautam.

    Does that mean that I cannot have a custom ISR for the GPTRIP interrupts? Are they hard-coded to only do specific things, like shut off PWMs?

    If so, does that mean that the only custom ISRs from GPIO events I can have are the three XINTs?

  • Michael, what I mean is you can have a custom ISR for trip signals too but what use of such an ISR, if whole system is shutdown by shutting the PWMs :)   (It effects the functionality of PWM peripheral)

    So XINT is the most preferable.  Also one more thing I noticed while working on both is that trip signals are very sensitive and are bound to occur even if it catches slight of switching noise. Whereas XINT on the other hand, we can increase the time for which rising/ falling edge can be captured. So this increases the reliability of the systems by detecting the actual faults and eliminating the fake alerts.

    Regards,

    Gautam

  • I need to do more than just shut down PWMs. I would like to handle state transitions and other actions when these interrupts happen.

    So how would I use these additional interrupts? For example, like this?

    GpioG1TripRegs.GPTRIP7SEL.bit.GPTRIP7SEL = 24; // Setting GPTRIP7 to GPIO 24

    How do I then define the ISR for TRIPIN7? I used  PieVectTable.XINT1 = &ISR_function; for the XINTs, but I don't see an entry for GPTRIP7. Is the correct option then: PieVectTable.ECAP1_INT = &ISR2; ? Does that have a side effect on the ECAP?

    Thanks for the tip about sensitivity of the trip signals.