Home
Support

Knowledge Base

BSPs and drivers
Community resources
Product documentation
Questions?
Contact us

Using a DMA controller
 
QUESTION: Do you have any documentation on programming a DMA controller?

ANSWER: Because the details of programming a particular DMA controller vary considerably between different platforms and devices, we recommend that you familiarise yourself with the documentation from the hardware/chip manufacturer.

The basic access to the DMA controller, memory and interrupt handling is done using the standard QNX Neutrino API functions that are used generally for programming hardware devices, e.g.

mmap_device_memory()
mmap_device_io()
in8/16/32()
out8/16/32()
InterruptAttach
InterruptAttachEvent

In some cases QNX does supply dma libraries, which provide generic functions to perform dma transfers. This is typically only for embedded boards which use system-level dma controllers which are shared among multiple hardware devices. If this is the case, there will be a libdma_xyz as part of the BSP for that board.

Bus mastering PCI cards, which have their own dma controllers, are typically programmed directly, by hitting bits in the dma controller register(s) and waiting for the job to be indicated as done, by means of an interrupt.


Related Attachments
 None Found





Please contact us with your questions or concerns.