The MCUXpresso SDK provides a peripheral driver for the Direct Memory Access (DMA) of MCUXpresso SDK devices.
Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/dma
|
#define | DMA_MAX_TRANSFER_COUNT 0x400U |
| DMA max transfer size.
|
|
#define | FSL_FEATURE_DMA_LINK_DESCRIPTOR_ALIGN_SIZE (16U) |
| DMA channel numbers. More...
|
|
#define | DMA_ALLOCATE_HEAD_DESCRIPTORS(name, number) SDK_ALIGN(dma_descriptor_t name[number], FSL_FEATURE_DMA_DESCRIPTOR_ALIGN_SIZE) |
| DMA head descriptor table allocate macro To simplify user interface, this macro will help allocate descriptor memory, user just need to provide the name and the number for the allocate descriptor. More...
|
|
#define | DMA_ALLOCATE_HEAD_DESCRIPTORS_AT_NONCACHEABLE(name, number) AT_NONCACHEABLE_SECTION_ALIGN(dma_descriptor_t name[number], FSL_FEATURE_DMA_DESCRIPTOR_ALIGN_SIZE) |
| DMA head descriptor table allocate macro at noncacheable section To simplify user interface, this macro will help allocate descriptor memory at noncacheable section, user just need to provide the name and the number for the allocate descriptor. More...
|
|
#define | DMA_ALLOCATE_LINK_DESCRIPTORS(name, number) SDK_ALIGN(dma_descriptor_t name[number], FSL_FEATURE_DMA_LINK_DESCRIPTOR_ALIGN_SIZE) |
| DMA link descriptor table allocate macro To simplify user interface, this macro will help allocate descriptor memory, user just need to provide the name and the number for the allocate descriptor. More...
|
|
#define | DMA_ALLOCATE_LINK_DESCRIPTORS_AT_NONCACHEABLE(name, number) AT_NONCACHEABLE_SECTION_ALIGN(dma_descriptor_t name[number], FSL_FEATURE_DMA_LINK_DESCRIPTOR_ALIGN_SIZE) |
| DMA link descriptor table allocate macro at noncacheable section To simplify user interface, this macro will help allocate descriptor memory at noncacheable section, user just need to provide the name and the number for the allocate descriptor. More...
|
|
#define | DMA_ALLOCATE_DATA_TRANSFER_BUFFER(name, width) SDK_ALIGN(name, width) |
| DMA transfer buffer address need to align with the transfer width.
|
|
#define | DMA_COMMON_REG_GET(base, channel, reg) (((volatile uint32_t *)(&((base)->COMMON[0].reg)))[DMA_CHANNEL_GROUP(channel)]) |
| DMA linked descriptor address algin size.
|
|
#define | DMA_DESCRIPTOR_END_ADDRESS(start, inc, bytes, width) ((uint32_t *)((uint32_t)(start) + (inc) * (bytes) - (inc) * (width))) |
| DMA descriptor end address calculate. More...
|
|
#define | DMA_CHANNEL_XFER(reload, clrTrig, intA, intB, width, srcInc, dstInc, bytes) |
| DMA channel transfer configurations macro. More...
|
|
#define | DMA_MAX_TRANSFER_COUNT 0x400 |
| DMA max transfer size.
|
|
#define | FSL_FEATURE_DMA_LINK_DESCRIPTOR_ALIGN_SIZE (16U) |
| DMA channel numbers. More...
|
|
#define | DMA_ALLOCATE_HEAD_DESCRIPTORS(name, number) SDK_ALIGN(dma_descriptor_t name[number], FSL_FEATURE_DMA_DESCRIPTOR_ALIGN_SIZE) |
| DMA head descriptor table allocate macro To simplify user interface, this macro will help allocate descriptor memory, user just need to provide the name and the number for the allocate descriptor. More...
|
|
#define | DMA_ALLOCATE_HEAD_DESCRIPTORS_AT_NONCACHEABLE(name, number) AT_NONCACHEABLE_SECTION_ALIGN(dma_descriptor_t name[number], FSL_FEATURE_DMA_DESCRIPTOR_ALIGN_SIZE) |
| DMA head descriptor table allocate macro at noncacheable section To simplify user interface, this macro will help allocate descriptor memory at noncacheable section, user just need to provide the name and the number for the allocate descriptor. More...
|
|
#define | DMA_ALLOCATE_LINK_DESCRIPTORS(name, number) SDK_ALIGN(dma_descriptor_t name[number], FSL_FEATURE_DMA_LINK_DESCRIPTOR_ALIGN_SIZE) |
| DMA link descriptor table allocate macro To simplify user interface, this macro will help allocate descriptor memory, user just need to provide the name and the number for the allocate descriptor. More...
|
|
#define | DMA_ALLOCATE_LINK_DESCRIPTORS_AT_NONCACHEABLE(name, number) AT_NONCACHEABLE_SECTION_ALIGN(dma_descriptor_t name[number], FSL_FEATURE_DMA_LINK_DESCRIPTOR_ALIGN_SIZE) |
| DMA link descriptor table allocate macro at noncacheable section To simplify user interface, this macro will help allocate descriptor memory at noncacheable section, user just need to provide the name and the number for the allocate descriptor. More...
|
|
#define | DMA_ALLOCATE_DATA_TRANSFER_BUFFER(name, width) SDK_ALIGN(name, width) |
| DMA transfer buffer address need to align with the transfer width.
|
|
#define | DMA_COMMON_REG_GET(base, channel, reg) (((volatile uint32_t *)(&((base)->COMMON[0].reg)))[DMA_CHANNEL_GROUP(channel)]) |
| DMA linked descriptor address algin size.
|
|
#define | DMA_DESCRIPTOR_END_ADDRESS(start, inc, bytes, width) ((void *)((uint32_t)(start) + inc * bytes - inc * width)) |
| DMA descriptor end address calculate. More...
|
|
#define | DMA_CHANNEL_XFER(reload, clrTrig, intA, intB, width, srcInc, dstInc, bytes) |
| DMA channel transfer configurations macro. More...
|
|
|
enum | { kStatus_DMA_Busy = MAKE_STATUS(kStatusGroup_DMA, 0)
} |
| _dma_transfer_status DMA transfer status More...
|
|
enum | {
kDMA_AddressInterleave0xWidth = 0U,
kDMA_AddressInterleave1xWidth = 1U,
kDMA_AddressInterleave2xWidth = 2U,
kDMA_AddressInterleave4xWidth = 4U
} |
| _dma_addr_interleave_size dma address interleave size More...
|
|
enum | {
kDMA_Transfer8BitWidth = 1U,
kDMA_Transfer16BitWidth = 2U,
kDMA_Transfer32BitWidth = 4U
} |
| _dma_transfer_width dma transfer width More...
|
|
enum | dma_priority_t {
kDMA_ChannelPriority0 = 0,
kDMA_ChannelPriority1,
kDMA_ChannelPriority2,
kDMA_ChannelPriority3,
kDMA_ChannelPriority4,
kDMA_ChannelPriority5,
kDMA_ChannelPriority6,
kDMA_ChannelPriority7,
kDMA_ChannelPriority0 = 0,
kDMA_ChannelPriority1,
kDMA_ChannelPriority2,
kDMA_ChannelPriority3,
kDMA_ChannelPriority4,
kDMA_ChannelPriority5,
kDMA_ChannelPriority6,
kDMA_ChannelPriority7
} |
| DMA channel priority. More...
|
|
enum | dma_irq_t {
kDMA_IntA,
kDMA_IntB,
kDMA_IntError,
kDMA_IntA,
kDMA_IntB,
kDMA_IntError
} |
| DMA interrupt flags. More...
|
|
enum | dma_trigger_type_t {
kDMA_NoTrigger = 0,
kDMA_LowLevelTrigger = DMA_CHANNEL_CFG_HWTRIGEN(1) | DMA_CHANNEL_CFG_TRIGTYPE(1),
kDMA_HighLevelTrigger,
kDMA_FallingEdgeTrigger = DMA_CHANNEL_CFG_HWTRIGEN(1),
kDMA_RisingEdgeTrigger,
kDMA_NoTrigger = 0,
kDMA_LowLevelTrigger = DMA_CHANNEL_CFG_HWTRIGEN(1) | DMA_CHANNEL_CFG_TRIGTYPE(1),
kDMA_HighLevelTrigger,
kDMA_FallingEdgeTrigger = DMA_CHANNEL_CFG_HWTRIGEN(1),
kDMA_RisingEdgeTrigger
} |
| DMA trigger type. More...
|
|
enum | {
kDMA_BurstSize1 = 0U,
kDMA_BurstSize2 = 1U,
kDMA_BurstSize4 = 2U,
kDMA_BurstSize8 = 3U,
kDMA_BurstSize16 = 4U,
kDMA_BurstSize32 = 5U,
kDMA_BurstSize64 = 6U,
kDMA_BurstSize128 = 7U,
kDMA_BurstSize256 = 8U,
kDMA_BurstSize512 = 9U,
kDMA_BurstSize1024 = 10U
} |
| _dma_burst_size DMA burst size More...
|
|
enum | dma_trigger_burst_t {
kDMA_SingleTransfer = 0,
kDMA_LevelBurstTransfer = DMA_CHANNEL_CFG_TRIGBURST(1),
kDMA_EdgeBurstTransfer1 = DMA_CHANNEL_CFG_TRIGBURST(1),
kDMA_EdgeBurstTransfer2,
kDMA_EdgeBurstTransfer4,
kDMA_EdgeBurstTransfer8,
kDMA_EdgeBurstTransfer16,
kDMA_EdgeBurstTransfer32,
kDMA_EdgeBurstTransfer64,
kDMA_EdgeBurstTransfer128,
kDMA_EdgeBurstTransfer256,
kDMA_EdgeBurstTransfer512,
kDMA_EdgeBurstTransfer1024,
kDMA_SingleTransfer = 0,
kDMA_LevelBurstTransfer = DMA_CHANNEL_CFG_TRIGBURST(1),
kDMA_EdgeBurstTransfer1 = DMA_CHANNEL_CFG_TRIGBURST(1),
kDMA_EdgeBurstTransfer2,
kDMA_EdgeBurstTransfer4,
kDMA_EdgeBurstTransfer8,
kDMA_EdgeBurstTransfer16,
kDMA_EdgeBurstTransfer32,
kDMA_EdgeBurstTransfer64,
kDMA_EdgeBurstTransfer128,
kDMA_EdgeBurstTransfer256,
kDMA_EdgeBurstTransfer512,
kDMA_EdgeBurstTransfer1024
} |
| DMA trigger burst. More...
|
|
enum | dma_burst_wrap_t {
kDMA_NoWrap = 0,
kDMA_SrcWrap = DMA_CHANNEL_CFG_SRCBURSTWRAP(1),
kDMA_DstWrap = DMA_CHANNEL_CFG_DSTBURSTWRAP(1),
kDMA_SrcAndDstWrap,
kDMA_NoWrap = 0,
kDMA_SrcWrap = DMA_CHANNEL_CFG_SRCBURSTWRAP(1),
kDMA_DstWrap = DMA_CHANNEL_CFG_DSTBURSTWRAP(1),
kDMA_SrcAndDstWrap
} |
| DMA burst wrapping. More...
|
|
enum | dma_transfer_type_t {
kDMA_MemoryToMemory = 0x0U,
kDMA_PeripheralToMemory,
kDMA_MemoryToPeripheral,
kDMA_StaticToStatic,
kDMA_MemoryToMemory = 0x0U,
kDMA_PeripheralToMemory,
kDMA_MemoryToPeripheral,
kDMA_StaticToStatic
} |
| DMA transfer type. More...
|
|
enum | _dma_transfer_status { kStatus_DMA_Busy = MAKE_STATUS(kStatusGroup_DMA, 0)
} |
| DMA transfer status. More...
|
|
enum | _dma_addr_interleave_size {
kDMA_AddressInterleave0xWidth = 0U,
kDMA_AddressInterleave1xWidth = 1U,
kDMA_AddressInterleave2xWidth = 2U,
kDMA_AddressInterleave4xWidth = 4U
} |
| dma address interleave size More...
|
|
enum | _dma_transfer_width {
kDMA_Transfer8BitWidth = 1U,
kDMA_Transfer16BitWidth = 2U,
kDMA_Transfer32BitWidth = 4U
} |
| dma transfer width More...
|
|
enum | dma_priority_t {
kDMA_ChannelPriority0 = 0,
kDMA_ChannelPriority1,
kDMA_ChannelPriority2,
kDMA_ChannelPriority3,
kDMA_ChannelPriority4,
kDMA_ChannelPriority5,
kDMA_ChannelPriority6,
kDMA_ChannelPriority7,
kDMA_ChannelPriority0 = 0,
kDMA_ChannelPriority1,
kDMA_ChannelPriority2,
kDMA_ChannelPriority3,
kDMA_ChannelPriority4,
kDMA_ChannelPriority5,
kDMA_ChannelPriority6,
kDMA_ChannelPriority7
} |
| DMA channel priority. More...
|
|
enum | dma_irq_t {
kDMA_IntA,
kDMA_IntB,
kDMA_IntError,
kDMA_IntA,
kDMA_IntB,
kDMA_IntError
} |
| DMA interrupt flags. More...
|
|
enum | dma_trigger_type_t {
kDMA_NoTrigger = 0,
kDMA_LowLevelTrigger = DMA_CHANNEL_CFG_HWTRIGEN(1) | DMA_CHANNEL_CFG_TRIGTYPE(1),
kDMA_HighLevelTrigger,
kDMA_FallingEdgeTrigger = DMA_CHANNEL_CFG_HWTRIGEN(1),
kDMA_RisingEdgeTrigger,
kDMA_NoTrigger = 0,
kDMA_LowLevelTrigger = DMA_CHANNEL_CFG_HWTRIGEN(1) | DMA_CHANNEL_CFG_TRIGTYPE(1),
kDMA_HighLevelTrigger,
kDMA_FallingEdgeTrigger = DMA_CHANNEL_CFG_HWTRIGEN(1),
kDMA_RisingEdgeTrigger
} |
| DMA trigger type. More...
|
|
enum | _dma_burst_size {
kDMA_BurstSize1 = 0U,
kDMA_BurstSize2 = 1U,
kDMA_BurstSize4 = 2U,
kDMA_BurstSize8 = 3U,
kDMA_BurstSize16 = 4U,
kDMA_BurstSize32 = 5U,
kDMA_BurstSize64 = 6U,
kDMA_BurstSize128 = 7U,
kDMA_BurstSize256 = 8U,
kDMA_BurstSize512 = 9U,
kDMA_BurstSize1024 = 10U
} |
| DMA burst size. More...
|
|
enum | dma_trigger_burst_t {
kDMA_SingleTransfer = 0,
kDMA_LevelBurstTransfer = DMA_CHANNEL_CFG_TRIGBURST(1),
kDMA_EdgeBurstTransfer1 = DMA_CHANNEL_CFG_TRIGBURST(1),
kDMA_EdgeBurstTransfer2,
kDMA_EdgeBurstTransfer4,
kDMA_EdgeBurstTransfer8,
kDMA_EdgeBurstTransfer16,
kDMA_EdgeBurstTransfer32,
kDMA_EdgeBurstTransfer64,
kDMA_EdgeBurstTransfer128,
kDMA_EdgeBurstTransfer256,
kDMA_EdgeBurstTransfer512,
kDMA_EdgeBurstTransfer1024,
kDMA_SingleTransfer = 0,
kDMA_LevelBurstTransfer = DMA_CHANNEL_CFG_TRIGBURST(1),
kDMA_EdgeBurstTransfer1 = DMA_CHANNEL_CFG_TRIGBURST(1),
kDMA_EdgeBurstTransfer2,
kDMA_EdgeBurstTransfer4,
kDMA_EdgeBurstTransfer8,
kDMA_EdgeBurstTransfer16,
kDMA_EdgeBurstTransfer32,
kDMA_EdgeBurstTransfer64,
kDMA_EdgeBurstTransfer128,
kDMA_EdgeBurstTransfer256,
kDMA_EdgeBurstTransfer512,
kDMA_EdgeBurstTransfer1024
} |
| DMA trigger burst. More...
|
|
enum | dma_burst_wrap_t {
kDMA_NoWrap = 0,
kDMA_SrcWrap = DMA_CHANNEL_CFG_SRCBURSTWRAP(1),
kDMA_DstWrap = DMA_CHANNEL_CFG_DSTBURSTWRAP(1),
kDMA_SrcAndDstWrap,
kDMA_NoWrap = 0,
kDMA_SrcWrap = DMA_CHANNEL_CFG_SRCBURSTWRAP(1),
kDMA_DstWrap = DMA_CHANNEL_CFG_DSTBURSTWRAP(1),
kDMA_SrcAndDstWrap
} |
| DMA burst wrapping. More...
|
|
enum | dma_transfer_type_t {
kDMA_MemoryToMemory = 0x0U,
kDMA_PeripheralToMemory,
kDMA_MemoryToPeripheral,
kDMA_StaticToStatic,
kDMA_MemoryToMemory = 0x0U,
kDMA_PeripheralToMemory,
kDMA_MemoryToPeripheral,
kDMA_StaticToStatic
} |
| DMA transfer type. More...
|
|
|
static bool | DMA_ChannelIsActive (DMA_Type *base, uint32_t channel) |
| Return whether DMA channel is processing transfer. More...
|
|
static bool | DMA_ChannelIsBusy (DMA_Type *base, uint32_t channel) |
| Return whether DMA channel is busy. More...
|
|
static void | DMA_EnableChannelInterrupts (DMA_Type *base, uint32_t channel) |
| Enables the interrupt source for the DMA transfer. More...
|
|
static void | DMA_DisableChannelInterrupts (DMA_Type *base, uint32_t channel) |
| Disables the interrupt source for the DMA transfer. More...
|
|
static void | DMA_EnableChannel (DMA_Type *base, uint32_t channel) |
| Enable DMA channel. More...
|
|
static void | DMA_DisableChannel (DMA_Type *base, uint32_t channel) |
| Disable DMA channel. More...
|
|
static void | DMA_EnableChannelPeriphRq (DMA_Type *base, uint32_t channel) |
| Set PERIPHREQEN of channel configuration register. More...
|
|
static void | DMA_DisableChannelPeriphRq (DMA_Type *base, uint32_t channel) |
| Get PERIPHREQEN value of channel configuration register. More...
|
|
void | DMA_ConfigureChannelTrigger (DMA_Type *base, uint32_t channel, dma_channel_trigger_t *trigger) |
| Set trigger settings of DMA channel. More...
|
|
void | DMA_SetChannelConfig (DMA_Type *base, uint32_t channel, dma_channel_trigger_t *trigger, bool isPeriph) |
| set channel config. More...
|
|
uint32_t | DMA_GetRemainingBytes (DMA_Type *base, uint32_t channel) |
| Gets the remaining bytes of the current DMA descriptor transfer. More...
|
|
static void | DMA_SetChannelPriority (DMA_Type *base, uint32_t channel, dma_priority_t priority) |
| Set priority of channel configuration register. More...
|
|
static dma_priority_t | DMA_GetChannelPriority (DMA_Type *base, uint32_t channel) |
| Get priority of channel configuration register. More...
|
|
static void | DMA_SetChannelConfigValid (DMA_Type *base, uint32_t channel) |
| Set channel configuration valid. More...
|
|
static void | DMA_DoChannelSoftwareTrigger (DMA_Type *base, uint32_t channel) |
| Do software trigger for the channel. More...
|
|
static void | DMA_LoadChannelTransferConfig (DMA_Type *base, uint32_t channel, uint32_t xfer) |
| Load channel transfer configurations. More...
|
|
void | DMA_CreateDescriptor (dma_descriptor_t *desc, dma_xfercfg_t *xfercfg, void *srcAddr, void *dstAddr, void *nextDesc) |
| Create application specific DMA descriptor to be used in a chain in transfer. More...
|
|
void | DMA_SetupDescriptor (dma_descriptor_t *desc, uint32_t xfercfg, void *srcStartAddr, void *dstStartAddr, void *nextDesc) |
| setup dma descriptor More...
|
|
void | DMA_SetupChannelDescriptor (dma_descriptor_t *desc, uint32_t xfercfg, void *srcStartAddr, void *dstStartAddr, void *nextDesc, dma_burst_wrap_t wrapType, uint32_t burstSize) |
| setup dma channel descriptor More...
|
|
void | DMA_LoadChannelDescriptor (DMA_Type *base, uint32_t channel, dma_descriptor_t *descriptor) |
| load channel transfer decriptor. More...
|
|
|
void | DMA_AbortTransfer (dma_handle_t *handle) |
| Abort running transfer by handle. More...
|
|
void | DMA_CreateHandle (dma_handle_t *handle, DMA_Type *base, uint32_t channel) |
| Creates the DMA handle. More...
|
|
void | DMA_SetCallback (dma_handle_t *handle, dma_callback callback, void *userData) |
| Installs a callback function for the DMA transfer. More...
|
|
void | DMA_PrepareTransfer (dma_transfer_config_t *config, void *srcAddr, void *dstAddr, uint32_t byteWidth, uint32_t transferBytes, dma_transfer_type_t type, void *nextDesc) |
| Prepares the DMA transfer structure. More...
|
|
void | DMA_PrepareChannelTransfer (dma_channel_config_t *config, void *srcStartAddr, void *dstStartAddr, uint32_t xferCfg, dma_transfer_type_t type, dma_channel_trigger_t *trigger, void *nextDesc) |
| Prepare channel transfer configurations. More...
|
|
status_t | DMA_SubmitTransfer (dma_handle_t *handle, dma_transfer_config_t *config) |
| Submits the DMA transfer request. More...
|
|
void | DMA_SubmitChannelTransferParameter (dma_handle_t *handle, uint32_t xfercfg, void *srcStartAddr, void *dstStartAddr, void *nextDesc) |
| Submit channel transfer paramter directly. More...
|
|
void | DMA_SubmitChannelDescriptor (dma_handle_t *handle, dma_descriptor_t *descriptor) |
| Submit channel descriptor. More...
|
|
status_t | DMA_SubmitChannelTransfer (dma_handle_t *handle, dma_channel_config_t *config) |
| Submits the DMA channel transfer request. More...
|
|
void | DMA_StartTransfer (dma_handle_t *handle) |
| DMA start transfer. More...
|
|
void | DMA_IRQHandle (DMA_Type *base) |
| DMA IRQ handler for descriptor transfer complete. More...
|
|