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.

Event edma of gpio... need I clear the interrupt flag?

 

I am getting a little confuse about GPIO interrupts/edma events in dm6437. So I would need some tips... for example, if I configure GPIO 1 to serve interrupts (rising and falling edges) in the ISR I would do a clear of the interrupt flag writting in the right bit of the INSTAT01 register... is this right?

But with EDMA... do I need still clear that flag of INSTAT01? I am wondering this, because it seems to me that this is needed as I think that I did it work without the need of clearing the INSTAT01 flag. In the other hand, if I need to do it, it would be counterproductive as on of the purposes of EDMA is to work in a standalone way without the need to check that kind of flags (for example, in my application I would like to produce an event on every edge of external signal, without check flags) ...

 

I can find too much info in the datasheet of dm6437 GPIOs , I attach you a pic with the main info about this:

  • When I configured my interrupts to take a rising edge, I noticed that I had to enable bank0:1 interrupts to get the individual interrupt lines to work.

     GPIO_SET_RIS_TRIG01 = 0x00000001; // take rising edge interrupt on sync in
     GPIO_BINTEN = 0x00000001; // enable interrupts for bank0:1

    In my ISR, I noticed that I would receive event flags for both the individual interrupt and for the bank interrupt.  Make sure you clear both.

     INTC_EVTCLR2 = (1 << 0)  |  (1 << 8); // clear event flags

     

    AHH, I (may have?) misunderstood your problem... are you wanting the dma to service events without having to take interrupts?

  • Thanks a lot for your answer Matt, but I think it is not needed to clear that interrupt flags. In SPRU871J says "For the case where the CPU services single-event interrupts (where system events are specified directly in the Interrupt Selector), there is no need to read or clear the Event Flag (EVTFLAGx) registers in the
    Interrupt Controller."

    The real need is to clear peripheral flag (from my point of view, maybe I am wrong). For example, I programmed a McBSP interrupt where I didn't clear that registers flags, only the associated flags of McBSP. So my questions, is... with a GPIO interrupt what I need to clear...? INSTAT register?

     

    The second question is: if I program EDMA to service GPIO edges... do I really need to still clear the flag?