1.2.6 Direct Memory Access (DMA) System Service

The Direct Memory Access (DMA) controller is a bus master module that is useful for data transfers between different peripherals without intervention from the CPU. The source and destination of a DMA transfer can be any of the memory-mapped modules. For example, memory, or one of the Peripheral Bus (PBUS) devices such as the SPI, UART, and so on.

Library Interface

DMA System Service provides the following interfaces:

Functions

NameDescription
SYS_DMA_ChannelCallbackRegisterThis function allows a DMA client to set an event handler
SYS_DMA_ChannelTransferAdds a data transfer to a DMA channel and enables the channel to start data transfer
SYS_DMA_ChannelIsBusyReturns the busy status of a specific DMA Channel
SYS_DMA_ChannelDisableDisables the specified channel
SYS_DMA_AddressingModeSetupSetup addressing mode of selected DMA channel
SYS_DMA_DataWidthSetupSetup data width of selected DMA channel

Data types and constants

NameTypeDescription
SYS_DMA_CHANNELEnumThis lists the set of channels available for data transfer using DMA
SYS_DMA_TRANSFER_EVENTEnumEnumeration of possible DMA transfer events
SYS_DMA_SOURCE_ADDRESSING_MODEEnumEnumeration of possible DMA source addressing modes
SYS_DMA_DESTINATION_ADDRESSING_MODEEnumEnumeration of possible DMA destination addressing modes
SYS_DMA_WIDTHEnumEnumeration of possible DMA data width
SYS_DMA_CHANNEL_CALLBACKTypedefPointer to a DMA Transfer Event handler function