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.

A question about system dma interrupt of omap5

The manul says that in contrast to the DMA4_CSRi registers, the DMA4_IRQSTATUS_Lj registers are updated regardless of the corresponding bits in the DMA4_IRQENABLE_Lj registers.

It means that no matter the corresponding logic channel interrupt control bits in DMA4_IRQENABLE_Lj  are enabled or not, the corresponding bit in DMA4_IRQSTATUS_Lj (j from 0 to 3) all will be set  if the logic channel generates a interrupt signal, but the DMA4_CSRi register are updated only when the corresponding bit in DMA4_CICRi was enabled.

It goes without saying that if I configure the DMA4_CSRi register to enable interrupt of the logic channel i and disable the corresponding interrupt in DMA4_IRQENABLE_Lj, it will update the DMA4_IRQSTATUS_Lj but not send the interrupt signal to the corresponding interrupt controler when the logic channel i generates a interrupt signal.

I want to know what I understand is right or not.

If it's wrong, please clear it for me.

If it's right, I would miss in the following case:

(1)The DMA4_CICR0 and DMA4_CICR1 are configured to enable interrupt of the logic channel 0 and 1.

(2)The DMA4_IRQENABLE_Lj's first bit is set but the other bits are cleared.

Firstly, the logic channel 1 generates a interrupt signal, it will set the DMA4_IRQSTATUS_Lj's second bit.

Then, the logic channel 0 generates another interrupt signal, it will set the DMA4_IRQSTATUS_Lj's first bit and send the interrupt signal to the corresponding interrupt controler and the software enteres the corresponding interrupt service routine.

To indentify which logic channel generates the interrupt, the software should read the DMA4_IRQSTATUS_Lj register, but there are two high level bits in the DMA4_IRQSTATUS_Lj  register. In my options, the software has to read the DMA4_IRQENABLE_Lj to identify the interrupt source. Is there any other better way for this case?

  • Hello,

    To the first part of your question:
    Your understanding is correct.

    The logical channels that generate interrupt on an IRQ output line are specified in DMA4_IRQENABLE_Lj.

    The events that generate the interrupt (IRQ sources) are enabled through DMA4_CICRi register for each channel.

    When IRQ is detected, the DMA channel that generated the event can be identified by reading the DMA4_IRQSTATUS & events causing the interrupt are specified by reading the DMA4_CSRi register.

    For more detailed description of the IRQ events & IRQ generation see Section 17.4.2.1 Interrupt Generation in OMAP5432 TRM.

    Best Regards,

    Yordan

  • If the DMA channel 1 that is enabled in DMA4_CICRi but disabled in DMA4_IRQENABLE has generated a interrupt event before the DMA channel 0 that is enabled in both DMA4_CICRi and DMA4_IRQENABLE, when IRQ is detected, the DMA4_IRQSTATUS register will be 0x00000003 and the LCH0 and LCH1 are both equal 1, but only the channel 0 is the originator of the interrupt. 

    That is the question, thank you for your help!

  • I got what you said, thank you very much for your help!!

    Best wishes