Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

AO channel select for DMA transfers (6229 Board

I am working on an open source linux driver for m-series boards - specifically the 6229 board.  The continuous analog out using DMA works, but only for channel 0.  In order to select the channel I write entries to the AO mode 1 register and the AO_Output_Control register.  So for and example, I want to use AO channel 2, so I write 0x81 to AO_Output_Control, then  0x2 to AO_Mode_1_Register.

Obviously I'm missing something  - can you spot it?

Thanks!
0 Kudos
Message 1 of 6
(9,064 Views)
Hi,

The register used to control the DMA channel selection is AI_AO_Select.  It has 2 fields AI_DMA_Select and AO_DMA_Select.  The valid values for these fields are:

0: DMA Disabled
1: DMA Channel 0
2: DMA Channel 1
4: DMA Channel 2
8: DMA Channel 3

Hope this helps.  If you continue to have problems could you post a code snipet of the configuration.
Diego.

Message 2 of 6
(8,996 Views)
What about dma channels 4 and 5? I'm sure I've read that the m-series boards are supposed to have 6 dma channels. The mite chip itself reports having 8 channels on m-series boards. Thanks.
0 Kudos
Message 3 of 6
(8,638 Views)
Hi fmhess-
 
The bitfield values for DMA channels 4 and 5 are as follow:

3: DMA Channel 4
5: DMA Channel 5

Hopefully this helps-

 
Tom W
National Instruments
Message 4 of 6
(8,634 Views)
Thank you for your quick answer! It still doesn't work yet, I believe because I'm not setting the mite to use the proper drq line. The mite documentation I have only accounts for the possibility of up to 4 drq lines, corresponding to mite channels 0 through 3. Are there extra REQS bits on the mite in the m-series? The docs for the mite's device configuration register say (the REQS bits are bits 16 through 18 in the register):

REQS[2:0] - Request Source. This selects the type of DMA request for the process.
000 - Internal Maximum Rate
010 - Disable Process. Programmed I/O to the FIFO
100 - Hardware Request 1, DRQ1 line from the IO bus
101 - Hardware Request 2, DRQ2 line from the IO bus
110 - Hardware Request 3, DRQ3 line from the IO bus
111 - Hardware Request 4, DRQ4 line from the IO bus
0 Kudos
Message 5 of 6
(8,630 Views)
Nevermind, I've got it working now. REQS bits 100 works for dma channel 4, and 101 works for channel 5.
0 Kudos
Message 6 of 6
(8,592 Views)