MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
The MCUXpresso SDK provides a peripheral driver for the Smart Direct Memory Access (SDMA) of devices.
Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/sdma
Data Structures | |
struct | sdma_config_t |
SDMA global configuration structure. More... | |
struct | sdma_multi_fifo_config_t |
SDMA multi fifo configurations. More... | |
struct | sdma_sw_done_config_t |
SDMA sw done configurations. More... | |
struct | sdma_p2p_config_t |
SDMA peripheral to peripheral R7 config. More... | |
struct | sdma_transfer_config_t |
SDMA transfer configuration. More... | |
struct | sdma_buffer_descriptor_t |
SDMA buffer descriptor structure. More... | |
struct | sdma_channel_control_t |
SDMA channel control descriptor structure. More... | |
struct | sdma_context_data_t |
SDMA context structure for each channel. More... | |
struct | sdma_handle_t |
SDMA transfer handle structure. More... | |
Typedefs | |
typedef void(* | sdma_callback )(struct _sdma_handle *handle, void *userData, bool transferDone, uint32_t bdIndex) |
Define callback function for SDMA. More... | |
Driver version | |
#define | FSL_SDMA_DRIVER_VERSION (MAKE_VERSION(2, 3, 0)) |
SDMA driver version. More... | |
SDMA initialization and de-initialization | |
void | SDMA_Init (SDMAARM_Type *base, const sdma_config_t *config) |
Initializes the SDMA peripheral. More... | |
void | SDMA_Deinit (SDMAARM_Type *base) |
Deinitializes the SDMA peripheral. More... | |
void | SDMA_GetDefaultConfig (sdma_config_t *config) |
Gets the SDMA default configuration structure. More... | |
void | SDMA_ResetModule (SDMAARM_Type *base) |
Sets all SDMA core register to reset status. More... | |
SDMA Channel Operation | |
static void | SDMA_EnableChannelErrorInterrupts (SDMAARM_Type *base, uint32_t channel) |
Enables the interrupt source for the SDMA error. More... | |
static void | SDMA_DisableChannelErrorInterrupts (SDMAARM_Type *base, uint32_t channel) |
Disables the interrupt source for the SDMA error. More... | |
SDMA Buffer Descriptor Operation | |
void | SDMA_ConfigBufferDescriptor (sdma_buffer_descriptor_t *bd, uint32_t srcAddr, uint32_t destAddr, sdma_transfer_size_t busWidth, size_t bufferSize, bool isLast, bool enableInterrupt, bool isWrap, sdma_transfer_type_t type) |
Sets buffer descriptor contents. More... | |
SDMA Channel Transfer Operation | |
static void | SDMA_SetChannelPriority (SDMAARM_Type *base, uint32_t channel, uint8_t priority) |
Set SDMA channel priority. More... | |
static void | SDMA_SetSourceChannel (SDMAARM_Type *base, uint32_t source, uint32_t channelMask) |
Set SDMA request source mapping channel. More... | |
static void | SDMA_StartChannelSoftware (SDMAARM_Type *base, uint32_t channel) |
Start a SDMA channel by software trigger. More... | |
static void | SDMA_StartChannelEvents (SDMAARM_Type *base, uint32_t channel) |
Start a SDMA channel by hardware events. More... | |
static void | SDMA_StopChannel (SDMAARM_Type *base, uint32_t channel) |
Stop a SDMA channel. More... | |
void | SDMA_SetContextSwitchMode (SDMAARM_Type *base, sdma_context_switch_mode_t mode) |
Set the SDMA context switch mode. More... | |
SDMA Channel Status Operation | |
static uint32_t | SDMA_GetChannelInterruptStatus (SDMAARM_Type *base) |
Gets the SDMA interrupt status of all channels. More... | |
static void | SDMA_ClearChannelInterruptStatus (SDMAARM_Type *base, uint32_t mask) |
Clear the SDMA channel interrupt status of specific channels. More... | |
static uint32_t | SDMA_GetChannelStopStatus (SDMAARM_Type *base) |
Gets the SDMA stop status of all channels. More... | |
static void | SDMA_ClearChannelStopStatus (SDMAARM_Type *base, uint32_t mask) |
Clear the SDMA channel stop status of specific channels. More... | |
static uint32_t | SDMA_GetChannelPendStatus (SDMAARM_Type *base) |
Gets the SDMA channel pending status of all channels. More... | |
static void | SDMA_ClearChannelPendStatus (SDMAARM_Type *base, uint32_t mask) |
Clear the SDMA channel pending status of specific channels. More... | |
static uint32_t | SDMA_GetErrorStatus (SDMAARM_Type *base) |
Gets the SDMA channel error status. More... | |
bool | SDMA_GetRequestSourceStatus (SDMAARM_Type *base, uint32_t source) |
Gets the SDMA request source pending status. More... | |
SDMA Transactional Operation | |
void | SDMA_CreateHandle (sdma_handle_t *handle, SDMAARM_Type *base, uint32_t channel, sdma_context_data_t *context) |
Creates the SDMA handle. More... | |
void | SDMA_InstallBDMemory (sdma_handle_t *handle, sdma_buffer_descriptor_t *BDPool, uint32_t BDCount) |
Installs the BDs memory pool into the SDMA handle. More... | |
void | SDMA_SetCallback (sdma_handle_t *handle, sdma_callback callback, void *userData) |
Installs a callback function for the SDMA transfer. More... | |
void | SDMA_SetMultiFifoConfig (sdma_transfer_config_t *config, uint32_t fifoNums, uint32_t fifoOffset) |
multi fifo configurations. More... | |
void | SDMA_EnableSwDone (SDMAARM_Type *base, sdma_transfer_config_t *config, uint8_t sel, sdma_peripheral_t type) |
enable sdma sw done feature. More... | |
void | SDMA_SetDoneConfig (SDMAARM_Type *base, sdma_transfer_config_t *config, sdma_peripheral_t type, sdma_done_src_t doneSrc) |
sdma channel done configurations. More... | |
void | SDMA_LoadScript (SDMAARM_Type *base, uint32_t destAddr, void *srcAddr, size_t bufferSizeBytes) |
load script to sdma program memory. More... | |
void | SDMA_DumpScript (SDMAARM_Type *base, uint32_t srcAddr, void *destAddr, size_t bufferSizeBytes) |
dump script from sdma program memory. More... | |
void | SDMA_PrepareTransfer (sdma_transfer_config_t *config, uint32_t srcAddr, uint32_t destAddr, uint32_t srcWidth, uint32_t destWidth, uint32_t bytesEachRequest, uint32_t transferSize, uint32_t eventSource, sdma_peripheral_t peripheral, sdma_transfer_type_t type) |
Prepares the SDMA transfer structure. More... | |
void | SDMA_PrepareP2PTransfer (sdma_transfer_config_t *config, uint32_t srcAddr, uint32_t destAddr, uint32_t srcWidth, uint32_t destWidth, uint32_t bytesEachRequest, uint32_t transferSize, uint32_t eventSource, uint32_t eventSource1, sdma_peripheral_t peripheral, sdma_p2p_config_t *p2p) |
Prepares the SDMA P2P transfer structure. More... | |
void | SDMA_SubmitTransfer (sdma_handle_t *handle, const sdma_transfer_config_t *config) |
Submits the SDMA transfer request. More... | |
void | SDMA_StartTransfer (sdma_handle_t *handle) |
SDMA starts transfer. More... | |
void | SDMA_StopTransfer (sdma_handle_t *handle) |
SDMA stops transfer. More... | |
void | SDMA_AbortTransfer (sdma_handle_t *handle) |
SDMA aborts transfer. More... | |
uint32_t | SDMA_GetTransferredBytes (sdma_handle_t *handle) |
Get transferred bytes while not using BD pools. More... | |
bool | SDMA_IsPeripheralInSPBA (uint32_t addr) |
Judge if address located in SPBA. More... | |
void | SDMA_HandleIRQ (sdma_handle_t *handle) |
SDMA IRQ handler for complete a buffer descriptor transfer. More... | |
struct sdma_config_t |
Data Fields | |
bool | enableRealTimeDebugPin |
If enable real-time debug pin, default is closed to reduce power consumption. More... | |
bool | isSoftwareResetClearLock |
If software reset clears the LOCK bit which prevent writing SDMA scripts into SDMA. More... | |
sdma_clock_ratio_t | ratio |
SDMA core clock ratio to ARM platform DMA interface. | |
bool sdma_config_t::enableRealTimeDebugPin |
bool sdma_config_t::isSoftwareResetClearLock |
struct sdma_multi_fifo_config_t |
Data Fields | |
uint8_t | fifoNums |
fifo numbers | |
uint8_t | fifoOffset |
offset between multi fifo data register address | |
struct sdma_sw_done_config_t |
Data Fields | |
bool | enableSwDone |
true is enable sw done, false is disable | |
uint8_t | swDoneSel |
sw done channel number per peripheral type | |
struct sdma_p2p_config_t |
Data Fields | |
uint8_t | sourceWatermark |
lower watermark value | |
uint8_t | destWatermark |
higher water makr value | |
bool | continuousTransfer |
0: the amount of samples to be transferred is equal to the cont field of mode word 1: the amount of samples to be transferred is unknown and script will keep on transferring as long as both events are detected and script must be stopped by application. More... | |
bool sdma_p2p_config_t::continuousTransfer |
struct sdma_transfer_config_t |
This structure configures the source/destination transfer attribute.
Data Fields | |
uint32_t | srcAddr |
Source address of the transfer. | |
uint32_t | destAddr |
Destination address of the transfer. | |
sdma_transfer_size_t | srcTransferSize |
Source data transfer size. More... | |
sdma_transfer_size_t | destTransferSize |
Destination data transfer size. More... | |
uint32_t | bytesPerRequest |
Bytes to transfer in a minor loop. | |
uint32_t | transferSzie |
Bytes to transfer for this descriptor. | |
uint32_t | scriptAddr |
SDMA script address located in SDMA ROM. More... | |
uint32_t | eventSource |
Event source number for the channel. More... | |
uint32_t | eventSource1 |
event source 1 | |
bool | isEventIgnore |
True means software trigger, false means hardware trigger. | |
bool | isSoftTriggerIgnore |
If ignore the HE bit, 1 means use hardware events trigger, 0 means software trigger. | |
sdma_transfer_type_t | type |
Transfer type, transfer type used to decide the SDMA script. More... | |
sdma_multi_fifo_config_t | multiFifo |
multi fifo configurations | |
sdma_sw_done_config_t | swDone |
sw done selector | |
uint32_t | watermarkLevel |
watermark level | |
uint32_t | eventMask0 |
event mask 0 | |
uint32_t | eventMask1 |
event mask 1 | |
sdma_transfer_size_t sdma_transfer_config_t::srcTransferSize |
sdma_transfer_size_t sdma_transfer_config_t::destTransferSize |
uint32_t sdma_transfer_config_t::scriptAddr |
uint32_t sdma_transfer_config_t::eventSource |
0 means no event, use software trigger
sdma_transfer_type_t sdma_transfer_config_t::type |
struct sdma_buffer_descriptor_t |
This structure is a buffer descriptor, this structure describes the buffer start address and other options
Data Fields | |
uint32_t | count: 16 |
Bytes of the buffer length for this buffer descriptor. More... | |
uint32_t | status: 8 |
E,R,I,C,W,D status bits stored here. | |
uint32_t | command: 8 |
command mostlky used for channel 0 | |
uint32_t | bufferAddr |
Buffer start address for this descriptor. More... | |
uint32_t | extendBufferAddr |
External buffer start address, this is an optional for a transfer. More... | |
uint32_t sdma_buffer_descriptor_t::count |
uint32_t sdma_buffer_descriptor_t::bufferAddr |
uint32_t sdma_buffer_descriptor_t::extendBufferAddr |
struct sdma_channel_control_t |
Data Fields | |
uint32_t | currentBDAddr |
Address of current buffer descriptor processed. | |
uint32_t | baseBDAddr |
The start address of the buffer descriptor array. | |
uint32_t | channelDesc |
Optional for transfer. | |
uint32_t | status |
Channel status. | |
struct sdma_context_data_t |
This structure can be load into SDMA core, with this structure, SDMA scripts can start work.
Data Fields | |
uint32_t | GeneralReg [8] |
8 general regsiters used for SDMA RISC core | |
struct sdma_handle_t |
Data Fields | |
sdma_callback | callback |
Callback function for major count exhausted. More... | |
void * | userData |
Callback function parameter. More... | |
SDMAARM_Type * | base |
SDMA peripheral base address. More... | |
sdma_buffer_descriptor_t * | BDPool |
Pointer to memory stored BD arrays. More... | |
uint32_t | bdCount |
How many buffer descriptor. | |
uint32_t | bdIndex |
How many buffer descriptor. | |
uint32_t | eventSource |
Event source count for the channel. | |
uint32_t | eventSource1 |
Event source 1 count for the channel. | |
sdma_context_data_t * | context |
Channel context to exectute in SDMA. | |
uint8_t | channel |
SDMA channel number. More... | |
uint8_t | priority |
SDMA channel priority. | |
uint8_t | flags |
The status of the current channel. More... | |
sdma_callback sdma_handle_t::callback |
void* sdma_handle_t::userData |
SDMAARM_Type* sdma_handle_t::base |
sdma_buffer_descriptor_t* sdma_handle_t::BDPool |
uint8_t sdma_handle_t::channel |
uint8_t sdma_handle_t::flags |
#define FSL_SDMA_DRIVER_VERSION (MAKE_VERSION(2, 3, 0)) |
Version 2.3.0.
typedef void(* sdma_callback)(struct _sdma_handle *handle, void *userData, bool transferDone, uint32_t bdIndex) |
enum sdma_transfer_size_t |
enum sdma_bd_status_t |
enum sdma_bd_command_t |
enum sdma_clock_ratio_t |
enum sdma_transfer_type_t |
enum sdma_peripheral_t |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
enum sdma_done_src_t |
void SDMA_Init | ( | SDMAARM_Type * | base, |
const sdma_config_t * | config | ||
) |
This function ungates the SDMA clock and configures the SDMA peripheral according to the configuration structure.
base | SDMA peripheral base address. |
config | A pointer to the configuration structure, see "sdma_config_t". |
void SDMA_Deinit | ( | SDMAARM_Type * | base | ) |
This function gates the SDMA clock.
base | SDMA peripheral base address. |
void SDMA_GetDefaultConfig | ( | sdma_config_t * | config | ) |
This function sets the configuration structure to default values. The default configuration is set to the following values.
config | A pointer to the SDMA configuration structure. |
void SDMA_ResetModule | ( | SDMAARM_Type * | base | ) |
If only reset ARM core, SDMA register cannot return to reset value, shall call this function to reset all SDMA register to reset value. But the internal status cannot be reset.
base | SDMA peripheral base address. |
|
inlinestatic |
Enable this will trigger an interrupt while SDMA occurs error while executing scripts.
base | SDMA peripheral base address. |
channel | SDMA channel number. |
|
inlinestatic |
base | SDMA peripheral base address. |
channel | SDMA channel number. |
void SDMA_ConfigBufferDescriptor | ( | sdma_buffer_descriptor_t * | bd, |
uint32_t | srcAddr, | ||
uint32_t | destAddr, | ||
sdma_transfer_size_t | busWidth, | ||
size_t | bufferSize, | ||
bool | isLast, | ||
bool | enableInterrupt, | ||
bool | isWrap, | ||
sdma_transfer_type_t | type | ||
) |
This function sets the descriptor contents such as source, dest address and status bits.
bd | Pointer to the buffer descriptor structure. |
srcAddr | Source address for the buffer descriptor. |
destAddr | Destination address for the buffer descriptor. |
busWidth | The transfer width, it only can be a member of sdma_transfer_size_t. |
bufferSize | Buffer size for this descriptor, this number shall less than 0xFFFF. If need to transfer a big size, shall divide into several buffer descriptors. |
isLast | Is the buffer descriptor the last one for the channel to transfer. If only one descriptor used for the channel, this bit shall set to TRUE. |
enableInterrupt | If trigger an interrupt while this buffer descriptor transfer finished. |
isWrap | Is the buffer descriptor need to be wrapped. While this bit set to true, it will automatically wrap to the first buffer descrtiptor to do transfer. |
type | Transfer type, memory to memory, peripheral to memory or memory to peripheral. |
|
inlinestatic |
This function sets the channel priority. The default value is 0 for all channels, priority 0 will prevents channel from starting, so the priority must be set before start a channel.
base | SDMA peripheral base address. |
channel | SDMA channel number. |
priority | SDMA channel priority. |
|
inlinestatic |
This function sets which channel will be triggered by the dma request source.
base | SDMA peripheral base address. |
source | SDMA dma request source number. |
channelMask | SDMA channel mask. 1 means channel 0, 2 means channel 1, 4 means channel 3. SDMA supports an event trigger multi-channel. A channel can also be triggered by several source events. |
|
inlinestatic |
This function start a channel.
base | SDMA peripheral base address. |
channel | SDMA channel number. |
|
inlinestatic |
This function start a channel.
base | SDMA peripheral base address. |
channel | SDMA channel number. |
|
inlinestatic |
This function stops a channel.
base | SDMA peripheral base address. |
channel | SDMA channel number. |
void SDMA_SetContextSwitchMode | ( | SDMAARM_Type * | base, |
sdma_context_switch_mode_t | mode | ||
) |
base | SDMA peripheral base address. |
mode | SDMA context switch mode. |
|
inlinestatic |
base | SDMA peripheral base address. |
|
inlinestatic |
base | SDMA peripheral base address. |
mask | The interrupt status need to be cleared. |
|
inlinestatic |
base | SDMA peripheral base address. |
|
inlinestatic |
base | SDMA peripheral base address. |
mask | The stop status need to be cleared. |
|
inlinestatic |
base | SDMA peripheral base address. |
|
inlinestatic |
base | SDMA peripheral base address. |
mask | The pending status need to be cleared. |
|
inlinestatic |
SDMA channel error flag is asserted while an incoming DMA request was detected and it triggers a channel that is already pending or being serviced. This probably means there is an overflow of data for that channel.
base | SDMA peripheral base address. |
bool SDMA_GetRequestSourceStatus | ( | SDMAARM_Type * | base, |
uint32_t | source | ||
) |
base | SDMA peripheral base address. |
source | DMA request source number. |
void SDMA_CreateHandle | ( | sdma_handle_t * | handle, |
SDMAARM_Type * | base, | ||
uint32_t | channel, | ||
sdma_context_data_t * | context | ||
) |
This function is called if using the transactional API for SDMA. This function initializes the internal state of the SDMA handle.
handle | SDMA handle pointer. The SDMA handle stores callback function and parameters. |
base | SDMA peripheral base address. |
channel | SDMA channel number. |
context | Context structure for the channel to download into SDMA. Users shall make sure the context located in a non-cacheable memory, or it will cause SDMA run fail. Users shall not touch the context contents, it only be filled by SDMA driver in SDMA_SubmitTransfer function. |
void SDMA_InstallBDMemory | ( | sdma_handle_t * | handle, |
sdma_buffer_descriptor_t * | BDPool, | ||
uint32_t | BDCount | ||
) |
This function is called after the SDMA_CreateHandle to use multi-buffer feature.
handle | SDMA handle pointer. |
BDPool | A memory pool to store BDs. It must be located in non-cacheable address. |
BDCount | The number of BD slots. |
void SDMA_SetCallback | ( | sdma_handle_t * | handle, |
sdma_callback | callback, | ||
void * | userData | ||
) |
This callback is called in the SDMA IRQ handler. Use the callback to do something after the current major loop transfer completes.
handle | SDMA handle pointer. |
callback | SDMA callback function pointer. |
userData | A parameter for the callback function. |
void SDMA_SetMultiFifoConfig | ( | sdma_transfer_config_t * | config, |
uint32_t | fifoNums, | ||
uint32_t | fifoOffset | ||
) |
This api is used to support multi fifo for SDMA, if user want to get multi fifo data, then this api shoule be called before submit transfer.
config | transfer configurations. |
fifoNums | fifo numbers that multi fifo operation perform. |
fifoOffset | offset between multififo address. |
void SDMA_EnableSwDone | ( | SDMAARM_Type * | base, |
sdma_transfer_config_t * | config, | ||
uint8_t | sel, | ||
sdma_peripheral_t | type | ||
) |
base | SDMA base. |
config | transfer configurations. |
sel | sw done selector. |
type | peripheral type is used to determine the corresponding peripheral sw done selector bit. |
void SDMA_SetDoneConfig | ( | SDMAARM_Type * | base, |
sdma_transfer_config_t * | config, | ||
sdma_peripheral_t | type, | ||
sdma_done_src_t | doneSrc | ||
) |
base | SDMA base. |
config | transfer configurations. |
type | peripheral type. |
doneSrc | reference sdma_done_src_t. |
void SDMA_LoadScript | ( | SDMAARM_Type * | base, |
uint32_t | destAddr, | ||
void * | srcAddr, | ||
size_t | bufferSizeBytes | ||
) |
base | SDMA base. |
destAddr | dest script address, should be SDMA program memory address. |
srcAddr | source address of target script. |
bufferSizeBytes | bytes size of script. |
void SDMA_DumpScript | ( | SDMAARM_Type * | base, |
uint32_t | srcAddr, | ||
void * | destAddr, | ||
size_t | bufferSizeBytes | ||
) |
base | SDMA base. |
srcAddr | should be SDMA program memory address. |
destAddr | address to store scripts. |
bufferSizeBytes | bytes size of script. |
void SDMA_PrepareTransfer | ( | sdma_transfer_config_t * | config, |
uint32_t | srcAddr, | ||
uint32_t | destAddr, | ||
uint32_t | srcWidth, | ||
uint32_t | destWidth, | ||
uint32_t | bytesEachRequest, | ||
uint32_t | transferSize, | ||
uint32_t | eventSource, | ||
sdma_peripheral_t | peripheral, | ||
sdma_transfer_type_t | type | ||
) |
This function prepares the transfer configuration structure according to the user input.
config | The user configuration structure of type sdma_transfer_t. |
srcAddr | SDMA transfer source address. |
destAddr | SDMA transfer destination address. |
srcWidth | SDMA transfer source address width(bytes). |
destWidth | SDMA transfer destination address width(bytes). |
bytesEachRequest | SDMA transfer bytes per channel request. |
transferSize | SDMA transfer bytes to be transferred. |
eventSource | Event source number for the transfer, if use software trigger, just write 0. |
peripheral | Peripheral type, used to decide if need to use some special scripts. |
type | SDMA transfer type. Used to decide the correct SDMA script address in SDMA ROM. |
void SDMA_PrepareP2PTransfer | ( | sdma_transfer_config_t * | config, |
uint32_t | srcAddr, | ||
uint32_t | destAddr, | ||
uint32_t | srcWidth, | ||
uint32_t | destWidth, | ||
uint32_t | bytesEachRequest, | ||
uint32_t | transferSize, | ||
uint32_t | eventSource, | ||
uint32_t | eventSource1, | ||
sdma_peripheral_t | peripheral, | ||
sdma_p2p_config_t * | p2p | ||
) |
This function prepares the transfer configuration structure according to the user input.
config | The user configuration structure of type sdma_transfer_t. |
srcAddr | SDMA transfer source address. |
destAddr | SDMA transfer destination address. |
srcWidth | SDMA transfer source address width(bytes). |
destWidth | SDMA transfer destination address width(bytes). |
bytesEachRequest | SDMA transfer bytes per channel request. |
transferSize | SDMA transfer bytes to be transferred. |
eventSource | Event source number for the transfer. |
eventSource1 | Event source1 number for the transfer. |
peripheral | Peripheral type, used to decide if need to use some special scripts. |
p2p | sdma p2p configuration pointer. |
void SDMA_SubmitTransfer | ( | sdma_handle_t * | handle, |
const sdma_transfer_config_t * | config | ||
) |
This function submits the SDMA transfer request according to the transfer configuration structure.
handle | SDMA handle pointer. |
config | Pointer to SDMA transfer configuration structure. |
void SDMA_StartTransfer | ( | sdma_handle_t * | handle | ) |
This function enables the channel request. Users can call this function after submitting the transfer request or before submitting the transfer request.
handle | SDMA handle pointer. |
void SDMA_StopTransfer | ( | sdma_handle_t * | handle | ) |
This function disables the channel request to pause the transfer. Users can call SDMA_StartTransfer() again to resume the transfer.
handle | SDMA handle pointer. |
void SDMA_AbortTransfer | ( | sdma_handle_t * | handle | ) |
This function disables the channel request and clear transfer status bits. Users can submit another transfer after calling this API.
handle | DMA handle pointer. |
uint32_t SDMA_GetTransferredBytes | ( | sdma_handle_t * | handle | ) |
This function returns the buffer descriptor count value if not using buffer descriptor. While do a simple transfer, which only uses one descriptor, the SDMA driver inside handle the buffer descriptor. In uart receive case, it can tell users how many data already received, also it can tells users how many data transfferd while error occurred. Notice, the count would not change while transfer is on-going using default SDMA script.
handle | DMA handle pointer. |
bool SDMA_IsPeripheralInSPBA | ( | uint32_t | addr | ) |
addr | Address which need to judge. |
return | True means located in SPBA, false means not. |
void SDMA_HandleIRQ | ( | sdma_handle_t * | handle | ) |
This function clears the interrupt flags and also handle the CCB for the channel.
handle | SDMA handle pointer. |