Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

mseries dma with interrupts

Hi,

I am writing a driver for a M6259 and I am having difficulties getting the dma controller to trigger an interrupt. The interrupt handler works without dma and the dma setup seem correct since I can poll and get data. I have set SET_DMA_IE and SET_DONE_IE in CHCR using the tMite class in mseries_dma.zip that I found in one of the other messages. The only time that I get an interrupt is when I set SET_CONT_IE, and this only happens when the buffer has overflowed.

Any thoughts?


0 Kudos
Message 1 of 3
(7,245 Views)
Hi,

the DONE interrupt will occur only in Normal mode, when the DMA engine is able to determine that the transfer is complete.  In Ring Mode the transfer is never done.  CONT is asserted in ring mode when the transfer stops, which is really when an error occurs.  There's not a good interrupt condition when using ring mode.

Could you describe what you are trying to do? (AI, AO, Finite, Continuous, etc).  As an alternative, you might be able to use interrupts from the timing engine instead of the DMA engine.

Diego.
0 Kudos
Message 2 of 3
(7,093 Views)
Diego,

I was unable to get normal DMA mode to work so I used ring mode, like the example. I would be nice if little things like this were documented!

Anyway I am reading AI continuously but the Continuous flag in iaNumberofSamples is set to false. I have solved the problem by moving the copying of the data from the DMA buffer to user space from the interrupt handler (QNX responded to the end of conversion interrupt before the DMA was finished). If I run into any other issues I will try the normal DMA mode.

Neil

0 Kudos
Message 3 of 3
(7,081 Views)