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.

TMS320F280039C: GPIO interrupt of F280039C

Part Number: TMS320F280039C


Hi;

We can use the function below to set a GPIO pin to get an interrupt on both rising or falling edge. In other words, an interrupt will occur on either rising or falling edge. But when the interrupt is occurring, how we know the current interrupt is on rising or falling edge? Any function to use to find out what kind of edge triggered the interrupt?  

GPIO_setInterruptType(GPIO_INT_XINT1, GPIO_INT_TYPE_BOTH_EDGES);

Thanks and regards

Wen Li

  • Hi Wen,

    You can theoretically read the pin voltage using the GPyDAT registers right after an interrupt to read the level.

    You can also use ECAP for this if you want to automatically detect high and low pulses. If you want to know how to use ECAP, please make an additional post asking about how to use ECAP for this so it can be assigned to the ECAP experts.

    Regards,

    Vince

  • Thank you, Vince! Actually, I want to the GPIO being able to trigger on both edges, and know what type of the current edge is: rising or falling edge automatedly. I will submit another ticket for ECAP.

    best regards

    Wen