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.

28335 eCAP capture interrupt on either rising or falling edge

In the past, using a 2812, I was able to use the Capture Unit of the Event Manager to trigger an interrupt on the rising or falling edge of a signal.  I haven't been able to figure out how to do this with the eCAP Module of a 28335.  If anyone has done this, can you post the eCAP settings?

 

  • The 28335 eCAP peripheral doesn't support the both edges option, you have to know which is coming next and setup for two events, first one edge then the other edge. You can get interrupts from both events, but if you setup for a rising edge first, and a falling edge happens first it will get skipped.

  • You can make use of capture interrupt flag status.In interrupt service routine, check condition of interrupt flag status :

    if(event-1 flag is set)

    {

       execute event-1 instructions

    }

    else if(event-2 flag is set)

    {

       execute event-2 instructions

    }

    ......Like Wise