MCUXpresso SDK API Reference Manual  Rev 2.16.000
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
DMA: Direct Memory Access Driver

Overview

This document consists of sections titled with Driver Overview, Data Structures, Enumerations, Functions, etc., each with an overview list and detailed documentation. It is recommended to read the Driver Overview first for it includes a comprehensive description of the peripheral, driver and driver changes. Other sections give detailed information for APIs, enums, macros, etc., for your further reference.

Modules

 DMA Peripheral and Driver Overview
 Content including 1) peripheral features, work logic and work method; 2) driver design logic and use method; 3) typical use case.
 
 The Driver Change Log
 The current DMA driver version is 2.0.0.
 

Data Structures

struct  dma_channel_link_config_t
 DMA channel link configuration structure. More...
 
struct  dma_channel_transfer_config_t
 DMA channel transfer configuration structure. More...
 
struct  dma_config_t
 DMA configuration structure. More...
 
struct  dma_handle_t
 DMA transfer handle structure. More...
 

Typedefs

typedef void(* dma_transfer_callback_t )(dma_handle_t *psHandle, void *pUserData)
 Define callback function for DMA. More...
 

Enumerations

enum  { kStatus_DMA_ChannelBusy = MAKE_STATUS(kStatusGroup_DMA, 0) }
 _dma_channeltransfer_status DMA transfer status More...
 
enum  dma_channel_transfer_type_t {
  kDMA_ChannelTransferMemoryToMemory = 0x0U,
  kDMA_ChannelTransferPeripheralToMemory,
  kDMA_ChannelTransferMemoryToPeripheral
}
 DMA channel transfer type. More...
 
enum  _dma_channel_interrupt_enable { kDMA_ChannelInterruptEnable }
 DMA interrupt source. More...
 
enum  _dma_channel_status_flags {
  kDMA_ChannelTransactionsBCRFlag = DMA_DSR_BCR_BCR_MASK,
  kDMA_ChannelTransactionsDoneFlag = DMA_DSR_BCR_DONE_MASK,
  kDMA_ChannelTransactionsBusyFlag = DMA_DSR_BCR_BSY_MASK,
  kDMA_ChannelTransactionsRequestFlag = DMA_DSR_BCR_REQ_MASK
}
 _dma_channel_status_flags DMA channel status flags. More...
 
enum  _dma_error_status_flags {
  kDMA_ChannelConfigurationErrorFlag,
  kDMA_ChannelBusErrorOnSourceFlag,
  kDMA_ChannelBusErrorOnDestinatiFlag
}
 _dma_error_status_flags DMA channel detail error status flags. More...
 
enum  dma_channel_t {
  kDMA_Channel0 = 0U,
  kDMA_Channel1 = 1U,
  kDMA_Channel2 = 2U,
  kDMA_Channel3 = 3U
}
 DMA channel index. More...
 
enum  dma_channel_transfer_width_t {
  kDMA_ChannelTransferWidth32Bits = 0x0U,
  kDMA_ChannelTransferWidth8Bits,
  kDMA_ChannelTransferWidth16Bits
}
 DMA transfer width configuration. More...
 
enum  dma_channel_modulo_t {
  kDMA_ChannelModuloDisable = 0x0U,
  kDMA_ChannelModulo16bytes,
  kDMA_ChannelModulo32bytes,
  kDMA_ChannelModulo64bytes,
  kDMA_ChannelModulo128bytes,
  kDMA_ChannelModulo256bytes,
  kDMA_ChannelModulo512bytes,
  kDMA_ChannelModulo1Kbytes,
  kDMA_ChannelModulo2Kbytes,
  kDMA_ChannelModulo4Kbytes,
  kDMA_ChannelModulo8Kbytes,
  kDMA_ChannelModulo16Kbytes,
  kDMA_ChannelModulo32Kbytes,
  kDMA_ChannelModulo64Kbytes,
  kDMA_ChannelModulo128Kbytes,
  kDMA_ChannelModulo256Kbytes
}
 DMA channel modulo configuration. More...
 
enum  dma_channel_link_type_t {
  kDMA_ChannelLinkDisable = 0x0U,
  kDMA_ChannelLinkChannel1AndChannel2,
  kDMA_ChannelLinkChannel1,
  kDMA_ChannelLinkChannel1AfterBCR0
}
 DMA channel link type. More...
 
enum  dma_channel_address_increment_type_t {
  kDMA_ChannelAddressFix = 0x0U,
  kDMA_ChannelAddressIncrement = 0x1U
}
 DMA transfer address increment definition. More...
 

Driver version

#define FSL_DMA_DRIVER_VERSION   (MAKE_VERSION(2, 0, 0))
 DMA driver version. More...
 

DMA Initialization and De-initialization interfaces

void DMA_Init (DMA_Type *base, dma_config_t *psConfig)
 DMA initialization. More...
 
void DMA_Deinit (DMA_Type *base)
 DMA De-initialization. More...
 

DMA channel functional interfaces

void DMA_ResetChannel (DMA_Type *base, dma_channel_t eChannel)
 Resets the DMA channel. More...
 
void DMA_GetChannelDefaultTransferConfig (dma_channel_transfer_config_t *psTransfer, uint32_t u32SrcAddr, uint32_t u32DstAddr, uint32_t u32TotalBytes, dma_channel_transfer_width_t eTransferWidth, dma_channel_transfer_type_t eTransferType)
 Get channel default transfer configuration. More...
 
void DMA_SetChannelTransferConfig (DMA_Type *base, dma_channel_t eChannel, dma_channel_transfer_config_t *psTransfer)
 DMA set channel transfer configurations. More...
 
void DMA_SetChannelLinkConfig (DMA_Type *base, dma_channel_t eChannel, dma_channel_link_config_t *pLinkConfig)
 Configures the DMA channel link feature. More...
 
static void DMA_SetChannelSourceAddress (DMA_Type *base, dma_channel_t eChannel, uint32_t u32SrcAddr)
 Sets the DMA source address for the DMA transfer. More...
 
static void DMA_SetChannelDestinationAddress (DMA_Type *base, dma_channel_t eChannel, uint32_t u32DestAddr)
 Sets the DMA destination address for the DMA transfer. More...
 
static void DMA_SetChannelTransferSize (DMA_Type *base, dma_channel_t eChannel, uint32_t u32TransferSize)
 Sets the DMA transfer size for the DMA transfer. More...
 
void DMA_SetChannelPeripheralRequest (DMA_Type *base, dma_channel_t eChannel, dma_channel_request_source_t eChannelRequestSource)
 Sets the DMA transfer peripheral number for the DMA transfer. More...
 
void DMA_SetChannelModulo (DMA_Type *base, dma_channel_t eChannel, dma_channel_modulo_t eSrcModulo, dma_channel_modulo_t eDestModulo)
 Sets the source address range and the destination address range for the DMA transfer. More...
 
static void DMA_EnableChannelCycleSteal (DMA_Type *base, dma_channel_t eChannel, bool bEnable)
 Enables the DMA cycle steal for the DMA transfer. More...
 
static void DMA_EnableChannelAutoAlign (DMA_Type *base, dma_channel_t eChannel, bool bEnable)
 Enables the DMA auto align for the DMA transfer. More...
 

DMA Channel interrupt Interfaces

static void DMA_EnableChannelInterrupt (DMA_Type *base, dma_channel_t eChannel, bool bEnable)
 Enables an interrupt for the DMA transfer. More...
 

DMA Channel Transfer Operation

static void DMA_EnableChannelPeripheralRequest (DMA_Type *base, dma_channel_t eChannel, bool bEnable)
 Enables the DMA hardware channel request. More...
 
static void DMA_TriggerChannelStart (DMA_Type *base, dma_channel_t eChannel)
 Starts the DMA transfer with a software trigger. More...
 
static void DMA_EnableChannelAutoStopRequest (DMA_Type *base, dma_channel_t eChannel, bool bEnable)
 Starts the DMA enable/disable auto disable request. More...
 

DMA Channel Status Interfaces

static uint32_t DMA_GetChannelRemainingBytes (DMA_Type *base, dma_channel_t eChannel)
 Gets the remaining bytes of the current DMA transfer. More...
 
static uint32_t DMA_GetChannelStatusFlags (DMA_Type *base, dma_channel_t eChannel)
 Gets the DMA channel status flags. More...
 
static void DMA_ClearChannelDoneStatus (DMA_Type *base, dma_channel_t eChannel)
 Clears the DMA channel status flags. More...
 

DMA Transactional Interfaces

void DMA_TransferChannelCreateHandle (DMA_Type *base, dma_handle_t *psHandle, dma_channel_t eChannel, dma_transfer_callback_t pfCallback, void *pUserData)
 Creates the DMA handle. More...
 
status_t DMA_TransferChannelSubmit (dma_handle_t *psHandle, dma_channel_transfer_config_t *psTransfer)
 Submits the DMA transfer request. More...
 
void DMA_TransferChannelStart (dma_handle_t *psHandle, bool bIsPeripheral)
 DMA starts transfer. More...
 
void DMA_TransferChannelStop (dma_handle_t *psHandle)
 DMA stops a transfer. More...
 
void DMA_TransferChannelAbort (dma_handle_t *psHandle)
 DMA aborts transfer. More...
 
void DMA_TransferChannelHandleIRQ (dma_handle_t *psHandle)
 DMA IRQ handler for current transfer complete. More...
 

Data Structure Documentation

struct dma_channel_link_config_t

Data Fields

dma_channel_link_type_t linkType
 Channel link type. More...
 
dma_channel_t eChannel1
 The index of channel 1. More...
 
dma_channel_t eChannel2
 The index of channel 2. More...
 

Field Documentation

dma_channel_link_type_t dma_channel_link_config_t::linkType
dma_channel_t dma_channel_link_config_t::eChannel1
dma_channel_t dma_channel_link_config_t::eChannel2
struct dma_channel_transfer_config_t

The transfer configuration structure support full feature configuration of the transfer control descriptor.

Data Fields

uint32_t u32SrcAddr
 source byte address
 
uint32_t u32DstAddr
 destination byte address
 
dma_channel_transfer_width_t eSrcWidthOfEachTransfer
 source width of each transfer
 
dma_channel_transfer_width_t eDstWidthOfEachTransfer
 destination width of each transfer
 
dma_channel_modulo_t eSrcAddrModulo
 Defines the size of the source data circular buffer used by the DMA Controller.
 
dma_channel_modulo_t eDstAddrModulo
 defines the size of the destination data circular buffer used by the DMA Controller
 
dma_channel_address_increment_type_t eEnableSrcIncrement
 Source address increase after each transfer.
 
dma_channel_address_increment_type_t eEnableDestIncrement
 destination address increase after each transfer
 
dma_channel_link_config_tpChannelLinkControl
 allows DMA channels to have their transfers linked
 
uint32_t u32TransferSize
 the number of bytes to be transferred
 
bool bEnableInterrupt
 enable interrupt on completion of transfer
 
bool bEnableAutoAlign
 enable the channel auto align
 
bool bEnablAutoStopPeripheralRequest
 
                  DMA hardware automatically clears the corresponding DCRn[ERQ] bit

when the byte count register reaches 0. More...

 
bool bEnableCycleSteal
 enable cycle steal, forces a single read/write transfer per request
 

Field Documentation

bool dma_channel_transfer_config_t::bEnablAutoStopPeripheralRequest
struct dma_config_t

This structure target for whole dma module configurations.

Data Fields

dma_channel_transfer_config_tpsChannelTransferConfig [FSL_FEATURE_DMA_MODULE_CHANNEL]
 channel transfer configuration pointer
 
struct _dma_handle

handler for DMA

Data Fields

dma_transfer_callback_t pfCallback
 DMA callback function. More...
 
void * pUserData
 Callback function parameter. More...
 
DMA_Type * psBase
 DMA peripheral base address. More...
 
dma_channel_t eChannel
 DMA channel used. More...
 

Field Documentation

dma_transfer_callback_t dma_handle_t::pfCallback
void* dma_handle_t::pUserData
DMA_Type* dma_handle_t::psBase
dma_channel_t dma_handle_t::eChannel

Macro Definition Documentation

#define FSL_DMA_DRIVER_VERSION   (MAKE_VERSION(2, 0, 0))

Typedef Documentation

typedef void(* dma_transfer_callback_t)(dma_handle_t *psHandle, void *pUserData)

This callback function is called in the DMA interrupt handler function. In normal mode, running into callback function means the transfer users need is done.

Parameters
psHandleDMA handle pointer, users shall not touch the values inside.
pUserDataThe callback user parameter pointer. Users can use this parameter to involve things users need to change in DMA callback function.

Enumeration Type Documentation

anonymous enum

The enumerator used for transactional interface only.

Enumerator
kStatus_DMA_ChannelBusy 

Channel is busy and can't handle the transfer request.

Enumerator
kDMA_ChannelTransferMemoryToMemory 

Transfer type from memory to memory assume that the both source and destination address are incremental.

kDMA_ChannelTransferPeripheralToMemory 

Transfer type peripher to memory assume that the source address is fixed.

kDMA_ChannelTransferMemoryToPeripheral 

Transfer type from memory to peripheral assume that the destination address is fixed.

Enumerator
kDMA_ChannelInterruptEnable 

Enable interrupt while transfer complete.

Enumerator
kDMA_ChannelTransactionsBCRFlag 

Contains the number of bytes yet to be transferred for a given block.

kDMA_ChannelTransactionsDoneFlag 

Transactions Done.

kDMA_ChannelTransactionsBusyFlag 

Transactions Busy.

kDMA_ChannelTransactionsRequestFlag 

Transactions Request.

Enumerator
kDMA_ChannelConfigurationErrorFlag 

Any of the following conditions causes a configuration error: BCR, SAR, or DAR does not match the requested transfer size.

SSIZE or DSIZE is set to an unsupported value. BCR equals 0 when the DMA receives a start condition. CE is cleared at hardware reset or by writing a 1 to DONE.

kDMA_ChannelBusErrorOnSourceFlag 

BES is cleared at hardware reset or by writing a 1 to DONE.

kDMA_ChannelBusErrorOnDestinatiFlag 

BED is cleared at hardware reset or by writing a 1 to DONE.

Enumerator
kDMA_Channel0 

DMA channel 0.

kDMA_Channel1 

DMA channel 1.

kDMA_Channel2 

DMA channel 2.

kDMA_Channel3 

DMA channel 3.

Enumerator
kDMA_ChannelTransferWidth32Bits 

Source/Destination data transfer width is 4 byte every time.

kDMA_ChannelTransferWidth8Bits 

Source/Destination data transfer width is 1 bytes every time.

kDMA_ChannelTransferWidth16Bits 

Source/Destination data transfer width is 2 bytes every time.

The DMA modulo feature can be used to specify the address range of the source/destination address, it is useful to implement a circular data queue.

Enumerator
kDMA_ChannelModuloDisable 

Disable modulo.

kDMA_ChannelModulo16bytes 

Circular buffer size is 16 bytes.

kDMA_ChannelModulo32bytes 

Circular buffer size is 32 bytes.

kDMA_ChannelModulo64bytes 

Circular buffer size is 64 bytes.

kDMA_ChannelModulo128bytes 

Circular buffer size is 128 bytes.

kDMA_ChannelModulo256bytes 

Circular buffer size is 256 bytes.

kDMA_ChannelModulo512bytes 

Circular buffer size is 512 bytes.

kDMA_ChannelModulo1Kbytes 

Circular buffer size is 1 K bytes.

kDMA_ChannelModulo2Kbytes 

Circular buffer size is 2 K bytes.

kDMA_ChannelModulo4Kbytes 

Circular buffer size is 4 K bytes.

kDMA_ChannelModulo8Kbytes 

Circular buffer size is 8 K bytes.

kDMA_ChannelModulo16Kbytes 

Circular buffer size is 16 K bytes.

kDMA_ChannelModulo32Kbytes 

Circular buffer size is 32 K bytes.

kDMA_ChannelModulo64Kbytes 

Circular buffer size is 64 K bytes.

kDMA_ChannelModulo128Kbytes 

Circular buffer size is 128 K bytes.

kDMA_ChannelModulo256Kbytes 

Circular buffer size is 256 K bytes.

Enumerator
kDMA_ChannelLinkDisable 

No channel link.

kDMA_ChannelLinkChannel1AndChannel2 

Perform a link to channel LCH1 after each cycle-steal transfer.

followed by a link to LCH2 after the BCR decrements to 0.

kDMA_ChannelLinkChannel1 

Perform a link to LCH1 after each cycle-steal transfer.

kDMA_ChannelLinkChannel1AfterBCR0 

Perform a link to LCH1 after the BCR decrements.

Enumerator
kDMA_ChannelAddressFix 

Address Fix.

kDMA_ChannelAddressIncrement 

Address increment.

Function Documentation

void DMA_Init ( DMA_Type *  base,
dma_config_t psConfig 
)
Parameters
baseDMA peripheral base address.
psConfigpointer to user's DMA configure structure, see dma_config_t for detail.
void DMA_Deinit ( DMA_Type *  base)
Parameters
baseDMA peripheral base address.
void DMA_ResetChannel ( DMA_Type *  base,
dma_channel_t  eChannel 
)

Sets all register values to reset values and enables the cycle steal and auto stop channel request features.

Parameters
baseDMA peripheral base address.
eChannelDMA channel number.
void DMA_GetChannelDefaultTransferConfig ( dma_channel_transfer_config_t psTransfer,
uint32_t  u32SrcAddr,
uint32_t  u32DstAddr,
uint32_t  u32TotalBytes,
dma_channel_transfer_width_t  eTransferWidth,
dma_channel_transfer_type_t  eTransferType 
)
Note
1. This function will reset all of the configuration structure members to zero firstly, then apply default configurations to the structure.
  1. No interrupt enabled by this function by default, if application would like to use DMA interrupt please enable it manually by psTransfer->u16EnabledInterruptMask = _dma_channel_interrupt
Parameters
psTransferpointer to user's DMA channel configure structure, see dma_channel_transfer_config_t for detail.
u32SrcAddrsource address, must be byte address.
u32DstAddrdestination address, must be byte address.
u32TotalBytestotal bytes to be transferred.
eTransferWidthit represents how many bits are transferred in each read/write.
eTransferTypeDMA channel transfer type.
void DMA_SetChannelTransferConfig ( DMA_Type *  base,
dma_channel_t  eChannel,
dma_channel_transfer_config_t psTransfer 
)
Parameters
baseDMA peripheral base address.
eChannelDMA channel number.
psTransferpointer to user's DMA channel configure structure, see dma_channel_transfer_config_t for detail.
void DMA_SetChannelLinkConfig ( DMA_Type *  base,
dma_channel_t  eChannel,
dma_channel_link_config_t pLinkConfig 
)

This function allows DMA channels to have their transfers linked. The current DMA channel triggers a DMA request to the linked channels (LCH1 or LCH2) depending on the channel link type. Perform a link to channel LCH1 after each cycle-steal transfer followed by a link to LCH2 after the BCR decrements to 0 if the type is kDMA_ChannelLinkChannel1AndChannel2. Perform a link to LCH1 after each cycle-steal transfer if the type is kDMA_ChannelLinkChannel1. Perform a link to LCH1 after the BCR decrements to 0 if the type is kDMA_ChannelLinkChannel1AfterBCR0.

Parameters
baseDMA peripheral base address.
eChannelDMA channel number.
pLinkConfigPointer to the channel link configuration structure.
static void DMA_SetChannelSourceAddress ( DMA_Type *  base,
dma_channel_t  eChannel,
uint32_t  u32SrcAddr 
)
inlinestatic
Parameters
baseDMA peripheral base address.
eChannelDMA channel number.
u32SrcAddrDMA source address.
static void DMA_SetChannelDestinationAddress ( DMA_Type *  base,
dma_channel_t  eChannel,
uint32_t  u32DestAddr 
)
inlinestatic
Parameters
baseDMA peripheral base address.
eChannelDMA channel number.
u32DestAddrDMA destination address.
static void DMA_SetChannelTransferSize ( DMA_Type *  base,
dma_channel_t  eChannel,
uint32_t  u32TransferSize 
)
inlinestatic
Parameters
baseDMA peripheral base address.
eChannelDMA channel number.
u32TransferSizeThe number of bytes to be transferred.
void DMA_SetChannelPeripheralRequest ( DMA_Type *  base,
dma_channel_t  eChannel,
dma_channel_request_source_t  eChannelRequestSource 
)
Parameters
baseDMA peripheral base address.
eChannelDMA channel number.
eChannelRequestSourceThe number of request source.
void DMA_SetChannelModulo ( DMA_Type *  base,
dma_channel_t  eChannel,
dma_channel_modulo_t  eSrcModulo,
dma_channel_modulo_t  eDestModulo 
)

This function defines a specific address range of source/destination address, after the source/destination address hits the range boundary, source/destination address will wrap to origin value.

Setting this field provides the ability to implement a circular data queue easily. For data queues require loop power-of-2 size bytes, the queue should start at a 0-modulo-size address and the SMOD field should be set to the appropriate value for the queue, freezing the desired number of upper address bits. The value programmed into this field specifies the number of lower address bits allowed to change

Parameters
baseDMA peripheral base address.
eChannelDMA channel number.
eSrcModuloA source modulo value.
eDestModuloA destination modulo value.
static void DMA_EnableChannelCycleSteal ( DMA_Type *  base,
dma_channel_t  eChannel,
bool  bEnable 
)
inlinestatic

If the cycle steal feature is enabled (true), the DMA controller forces a single read/write transfer per request, or it continuously makes read/write transfers until the BCR decrements to 0.

Parameters
baseDMA peripheral base address.
eChannelDMA channel number.
bEnableThe command for enable (true) or disable (false).
static void DMA_EnableChannelAutoAlign ( DMA_Type *  base,
dma_channel_t  eChannel,
bool  bEnable 
)
inlinestatic

If the auto align feature is enabled (true), the appropriate address register increments regardless of DINC or SINC.

Parameters
baseDMA peripheral base address.
eChannelDMA channel number.
bEnableThe command for enable (true) or disable (false).
static void DMA_EnableChannelInterrupt ( DMA_Type *  base,
dma_channel_t  eChannel,
bool  bEnable 
)
inlinestatic
Parameters
baseDMA peripheral base address.
eChannelDMA channel number.
bEnableThe command for enable (true) or disable (false).
static void DMA_EnableChannelPeripheralRequest ( DMA_Type *  base,
dma_channel_t  eChannel,
bool  bEnable 
)
inlinestatic
Parameters
baseDMA peripheral base address.
eChannelThe DMA channel number.
bEnableThe command for enable (true) or disable (false).
static void DMA_TriggerChannelStart ( DMA_Type *  base,
dma_channel_t  eChannel 
)
inlinestatic

This function starts only one read/write iteration.

Parameters
baseDMA peripheral base address.
eChannelThe DMA channel number.
static void DMA_EnableChannelAutoStopRequest ( DMA_Type *  base,
dma_channel_t  eChannel,
bool  bEnable 
)
inlinestatic
Parameters
baseDMA peripheral base address.
eChannelThe DMA channel number.
bEnabletrue is enable, false is disable.
static uint32_t DMA_GetChannelRemainingBytes ( DMA_Type *  base,
dma_channel_t  eChannel 
)
inlinestatic
Parameters
baseDMA peripheral base address.
eChannelDMA channel number.
Returns
The number of bytes which have not been transferred yet.
static uint32_t DMA_GetChannelStatusFlags ( DMA_Type *  base,
dma_channel_t  eChannel 
)
inlinestatic
Parameters
baseDMA peripheral base address.
eChannelDMA channel number.
Returns
The mask of the channel status. Use the _dma_channel_status_flags type to decode the return 32 bit variables.
static void DMA_ClearChannelDoneStatus ( DMA_Type *  base,
dma_channel_t  eChannel 
)
inlinestatic
Parameters
baseDMA peripheral base address.
eChannelDMA channel number.
void DMA_TransferChannelCreateHandle ( DMA_Type *  base,
dma_handle_t *  psHandle,
dma_channel_t  eChannel,
dma_transfer_callback_t  pfCallback,
void *  pUserData 
)

This function is called first if using the transactional API for the DMA. This function initializes the internal state of the DMA handle.

Parameters
baseDMA peripheral base address.
psHandleDMA handle pointer. The DMA handle stores callback function and parameters.
eChannelDMA channel number.
pfCallbackDMA callback function pointer.
pUserDataA parameter for the callback function.
status_t DMA_TransferChannelSubmit ( dma_handle_t *  psHandle,
dma_channel_transfer_config_t psTransfer 
)

This function submits the DMA transfer request according to the transfer configuration structure.

Parameters
psHandleDMA handle pointer.
psTransferPointer to DMA transfer configuration structure.
Return values
kStatus_DMA_SuccessIt indicates that the DMA submit transfer request succeeded.
kStatus_DMA_ChannelBusyIt indicates that the DMA is busy. Submit transfer request is not allowed.
Note
This function can't process multi transfer request.
void DMA_TransferChannelStart ( dma_handle_t *  psHandle,
bool  bIsPeripheral 
)

This function enables the channel request. Call this function after submitting a transfer request.

Parameters
psHandleDMA handle pointer.
bIsPeripheralFor true: enable DMA hardware request peripheral. For false: disable DMA hardware request peripheral.
void DMA_TransferChannelStop ( dma_handle_t *  psHandle)

This function disables the channel request to stop a DMA transfer. The transfer can be resumed by calling the DMA_StartTransfer.

Parameters
psHandleDMA handle pointer.
void DMA_TransferChannelAbort ( dma_handle_t *  psHandle)

This function disables the channel request and clear transfer status bits. Users can submit another transfer after calling this API.

Parameters
psHandleDMA handle pointer.
void DMA_TransferChannelHandleIRQ ( dma_handle_t *  psHandle)

This function clears the channel interrupt flag and calls the callback function if it is not NULL.

Parameters
psHandleDMA handle pointer.