Home
Support

Knowledge Base

BSPs and drivers
Community resources
Product documentation
Questions?
Contact us

Using a DMA controller
 
________________________________________________________________________

Applicable Environment
________________________________________________________________________
  • Topic: Using a DMA controller
  • SDP: 6.5.0 SP1
  • Target: Any supported target
________________________________________________________________________

Question
________________________________________________________________________

Do you have any documentation on programming a DMA controller?

________________________________________________________________________

Recommendation
________________________________________________________________________

Because the details of programming a particular DMA controller vary considerably between different platforms and devices, we recommend that you familiarize 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.

________________________________________________________________________
NOTE: This entry has been validated against the SDP version listed above. Use caution when considering this advice for any other SDP version. For supported releases, please reach out to QNX Technical Support if you have any questions/concerns.
________________________________________________________________________


Related Attachments
 None Found





Please contact us with your questions or concerns.