Data Structures | |
struct | GPDMA_CH_t |
struct | XMC_DMA_CH_CONFIG_t |
struct | XMC_DMA_LLI_t |
struct | XMC_DMA_t |
Macros | |
#define | XMC_DMA0 ((XMC_DMA_t *)GPDMA0_CH0_BASE) |
#define | XMC_DMA1 ((XMC_DMA_t *)GPDMA1_CH0_BASE) |
Typedefs | |
typedef void(* | XMC_DMA_CH_EVENT_HANDLER_t) (XMC_DMA_CH_EVENT_t event) |
typedef XMC_DMA_LLI_t ** | XMC_DMA_LIST_t |
Enumerations | |
enum | XMC_DMA_CH_ADDRESS_COUNT_MODE_t |
enum | XMC_DMA_CH_BURST_LENGTH_t |
enum | XMC_DMA_CH_DST_HANDSHAKING_t |
enum | XMC_DMA_CH_EVENT_t |
enum | XMC_DMA_CH_HARDWARE_HANDSHAKING_IF_t |
enum | XMC_DMA_CH_PRIORITY_t |
enum | XMC_DMA_CH_SRC_HANDSHAKING_t |
enum | XMC_DMA_CH_STATUS_t |
enum | XMC_DMA_CH_TRANSACTION_TYPE_t |
enum | XMC_DMA_CH_TRANSFER_FLOW_t |
enum | XMC_DMA_CH_TRANSFER_TYPE_t |
enum | XMC_DMA_CH_TRANSFER_WIDTH_t |
Functions | |
void | XMC_DMA_CH_ClearDestinationPeripheralRequest (XMC_DMA_t *const dma, uint8_t channel) |
void | XMC_DMA_CH_ClearEventStatus (XMC_DMA_t *const dma, const uint8_t channel, const uint32_t event) |
void | XMC_DMA_CH_ClearSourcePeripheralRequest (XMC_DMA_t *const dma, uint8_t channel) |
void | XMC_DMA_CH_Disable (XMC_DMA_t *const dma, const uint8_t channel) |
void | XMC_DMA_CH_DisableDestinationAddressReload (XMC_DMA_t *const dma, const uint8_t channel) |
void | XMC_DMA_CH_DisableDestinationScatter (XMC_DMA_t *const dma, const uint8_t channel) |
void | XMC_DMA_CH_DisableEvent (XMC_DMA_t *const dma, const uint8_t channel, const uint32_t event) |
void | XMC_DMA_CH_DisableFifoMode (XMC_DMA_t *const dma, uint8_t channel) |
void | XMC_DMA_CH_DisableSourceAddressReload (XMC_DMA_t *const dma, const uint8_t channel) |
void | XMC_DMA_CH_DisableSourceGather (XMC_DMA_t *const dma, const uint8_t channel) |
void | XMC_DMA_CH_Enable (XMC_DMA_t *const dma, const uint8_t channel) |
void | XMC_DMA_CH_EnableDestinationAddressReload (XMC_DMA_t *const dma, const uint8_t channel) |
void | XMC_DMA_CH_EnableDestinationScatter (XMC_DMA_t *const dma, const uint8_t channel, uint32_t interval, uint16_t count) |
void | XMC_DMA_CH_EnableEvent (XMC_DMA_t *const dma, const uint8_t channel, const uint32_t event) |
void | XMC_DMA_CH_EnableFifoMode (XMC_DMA_t *const dma, uint8_t channel) |
void | XMC_DMA_CH_EnableSourceAddressReload (XMC_DMA_t *const dma, const uint8_t channel) |
void | XMC_DMA_CH_EnableSourceGather (XMC_DMA_t *const dma, const uint8_t channel, uint32_t interval, uint16_t count) |
uint32_t | XMC_DMA_CH_GetEventStatus (XMC_DMA_t *const dma, const uint8_t channel) |
uint32_t | XMC_DMA_CH_GetTransferredData (XMC_DMA_t *const dma, const uint8_t channel) |
XMC_DMA_CH_STATUS_t | XMC_DMA_CH_Init (XMC_DMA_t *const dma, const uint8_t channel, const XMC_DMA_CH_CONFIG_t *const config) |
bool | XMC_DMA_CH_IsEnabled (XMC_DMA_t *const dma, const uint8_t channel) |
bool | XMC_DMA_CH_IsSuspended (XMC_DMA_t *const dma, const uint8_t channel) |
void | XMC_DMA_CH_RequestLastMultiblockTransfer (XMC_DMA_t *const dma, const uint8_t channel) |
void | XMC_DMA_CH_Resume (XMC_DMA_t *const dma, const uint8_t channel) |
void | XMC_DMA_CH_SetBlockSize (XMC_DMA_t *const dma, const uint8_t channel, uint32_t block_size) |
void | XMC_DMA_CH_SetDestinationAddress (XMC_DMA_t *const dma, const uint8_t channel, uint32_t addr) |
void | XMC_DMA_CH_SetEventHandler (XMC_DMA_t *const dma, const uint8_t channel, XMC_DMA_CH_EVENT_HANDLER_t event_handler) |
void | XMC_DMA_CH_SetLinkedListPointer (XMC_DMA_t *const dma, const uint8_t channel, XMC_DMA_LLI_t *ll_ptr) |
void | XMC_DMA_CH_SetSourceAddress (XMC_DMA_t *const dma, const uint8_t channel, uint32_t addr) |
void | XMC_DMA_CH_Suspend (XMC_DMA_t *const dma, const uint8_t channel) |
void | XMC_DMA_CH_TriggerDestinationRequest (XMC_DMA_t *const dma, const uint8_t channel, const XMC_DMA_CH_TRANSACTION_TYPE_t type, bool last) |
void | XMC_DMA_CH_TriggerSourceRequest (XMC_DMA_t *const dma, const uint8_t channel, const XMC_DMA_CH_TRANSACTION_TYPE_t type, bool last) |
void | XMC_DMA_ClearOverrunStatus (XMC_DMA_t *const dma, const uint8_t line) |
void | XMC_DMA_ClearRequestLine (XMC_DMA_t *const dma, uint8_t line) |
void | XMC_DMA_Disable (XMC_DMA_t *const dma) |
void | XMC_DMA_DisableRequestLine (XMC_DMA_t *const dma, uint8_t line) |
void | XMC_DMA_Enable (XMC_DMA_t *const dma) |
void | XMC_DMA_EnableRequestLine (XMC_DMA_t *const dma, uint8_t line, uint8_t peripheral) |
uint32_t | XMC_DMA_GetChannelsBlockCompleteStatus (XMC_DMA_t *const dma) |
uint32_t | XMC_DMA_GetChannelsDestinationTransactionCompleteStatus (XMC_DMA_t *const dma) |
uint32_t | XMC_DMA_GetChannelsErrorStatus (XMC_DMA_t *const dma) |
uint32_t | XMC_DMA_GetChannelsSourceTransactionCompleteStatus (XMC_DMA_t *const dma) |
uint32_t | XMC_DMA_GetChannelsTransferCompleteStatus (XMC_DMA_t *const dma) |
uint32_t | XMC_DMA_GetEventStatus (XMC_DMA_t *const dma) |
bool | XMC_DMA_GetOverrunStatus (XMC_DMA_t *const dma, const uint8_t line) |
void | XMC_DMA_Init (XMC_DMA_t *const dma) |
void | XMC_DMA_IRQHandler (XMC_DMA_t *const dma) |
bool | XMC_DMA_IsEnabled (const XMC_DMA_t *const dma) |
The GPDMA is a highly configurable DMA controller that allows high-speed data transfers between peripherals and memories. Complex data transfers can be done with minimal intervention of the processor, making CPU available for other operations.
GPDMA provides extensive support for XMC microcontroller peripherals like A/D, D/A converters and timers. Data transfers through communication interfaces (USIC) using the GPDMA increase efficiency and parallelism for real-time applications.
The DMA low level driver provides functions to configure and initialize the GPDMA hardware peripheral.
#define XMC_DMA0 ((XMC_DMA_t *)GPDMA0_CH0_BASE) |
DMA module 0
#define XMC_DMA1 ((XMC_DMA_t *)GPDMA1_CH0_BASE) |
DMA module 1, only available in XMC45xx series
typedef void(* XMC_DMA_CH_EVENT_HANDLER_t) (XMC_DMA_CH_EVENT_t event) |
DMA channel event handler
typedef XMC_DMA_LLI_t** XMC_DMA_LIST_t |
Type definition for a linked list pointer
enum XMC_DMA_CH_EVENT_t |
DMA events
DMA hardware handshaking interface Hardware handshaking available only if DMA is flow controller
DMA channel priorities
enum XMC_DMA_CH_STATUS_t |
DMA transfer flow modes
DMA transfer types
void XMC_DMA_CH_ClearDestinationPeripheralRequest | ( | XMC_DMA_t *const | dma, |
uint8_t | channel | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | The destination peripheral request for which DMA channel is to be cleared? |
void XMC_DMA_CH_ClearEventStatus | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel, | ||
const uint32_t | event | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | The channel for which the event(s) need(s) to be disabled |
event | A valid GPDMA event (XMC_DMA_CH_EVENT_t) or a valid combination of logically OR'd GPDMA events |
void XMC_DMA_CH_ClearSourcePeripheralRequest | ( | XMC_DMA_t *const | dma, |
uint8_t | channel | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | The source peripheral request for which DMA channel is to be cleared? |
void XMC_DMA_CH_Disable | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | Which DMA channel should be disabled? |
void XMC_DMA_CH_DisableDestinationAddressReload | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | The channel for which the destination address reload must be disabled |
void XMC_DMA_CH_DisableDestinationScatter | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | The source gather for which DMA channel is to be disabled? |
void XMC_DMA_CH_DisableEvent | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel, | ||
const uint32_t | event | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | The channel for which the event(s) need(s) to be disabled |
event | A valid GPDMA event (XMC_DMA_CH_EVENT_t) or a valid combination of logically OR'd GPDMA events |
void XMC_DMA_CH_DisableFifoMode | ( | XMC_DMA_t *const | dma, |
uint8_t | channel | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | The destination peripheral request for which DMA channel is to be cleared? |
void XMC_DMA_CH_DisableSourceAddressReload | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | The channel for which the source address reload must be disabled |
void XMC_DMA_CH_DisableSourceGather | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | The source gather for which DMA channel is to be disabled? |
void XMC_DMA_CH_Enable | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | Which DMA channel should be enabled? |
void XMC_DMA_CH_EnableDestinationAddressReload | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | The channel for which the destination address must be reloaded |
void XMC_DMA_CH_EnableDestinationScatter | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel, | ||
uint32_t | interval, | ||
uint16_t | count | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | Which DMA channel is used for destination scatter? |
interval | Scatter interval |
count | Scatter count |
void XMC_DMA_CH_EnableEvent | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel, | ||
const uint32_t | event | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | The channel for which the event(s) need(s) to be enabled |
event | A valid GPDMA event (XMC_DMA_CH_EVENT_t) or a valid combination of logically OR'd GPDMA events |
void XMC_DMA_CH_EnableFifoMode | ( | XMC_DMA_t *const | dma, |
uint8_t | channel | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | The destination peripheral request for which DMA channel is to be cleared? |
void XMC_DMA_CH_EnableSourceAddressReload | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | The channel for which the source address must be reloaded |
void XMC_DMA_CH_EnableSourceGather | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel, | ||
uint32_t | interval, | ||
uint16_t | count | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | Which DMA channel is used for source gather? |
interval | Gather interval |
count | Gather count |
uint32_t XMC_DMA_CH_GetEventStatus | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | The channel for which the event(s) status must be obtained |
uint32_t XMC_DMA_CH_GetTransferredData | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | The destination peripheral request for which DMA channel is to be cleared? |
XMC_DMA_CH_STATUS_t XMC_DMA_CH_Init | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel, | ||
const XMC_DMA_CH_CONFIG_t *const | config | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | The GPDMA channel (number) which needs to be initialized |
config | A constant pointer to XMC_DMA_CH_CONFIG_t, pointing to a const channel configuration |
bool XMC_DMA_CH_IsEnabled | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | Which DMA channel should be disabled? |
bool XMC_DMA_CH_IsSuspended | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | Which DMA channel should be checked for a suspended transfer? |
void XMC_DMA_CH_RequestLastMultiblockTransfer | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | Which DMA channel is participating in a multi-block transfer? |
void XMC_DMA_CH_Resume | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | Which DMA channel should resume transfer? |
void XMC_DMA_CH_SetBlockSize | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel, | ||
uint32_t | block_size | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | A DMA channel |
block_size | Transfer size [1-2048] |
void XMC_DMA_CH_SetDestinationAddress | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel, | ||
uint32_t | addr | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | A DMA channel |
addr | destination address |
void XMC_DMA_CH_SetEventHandler | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel, | ||
XMC_DMA_CH_EVENT_HANDLER_t | event_handler | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | The channel for which the event handler is being registered |
event_handler | The event handler which will be invoked when the DMA event occurs |
void XMC_DMA_CH_SetLinkedListPointer | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel, | ||
XMC_DMA_LLI_t * | ll_ptr | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | A DMA channel |
ll_ptr | linked list pointer |
void XMC_DMA_CH_SetSourceAddress | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel, | ||
uint32_t | addr | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | A DMA channel |
addr | source address |
void XMC_DMA_CH_Suspend | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | Which DMA channel should suspend transfer? |
void XMC_DMA_CH_TriggerDestinationRequest | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel, | ||
const XMC_DMA_CH_TRANSACTION_TYPE_t | type, | ||
bool | last | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | Which DMA channel is being used? |
type | Transaction type: Single/burst mode |
last | Specify "true" if it is the last destination request trigger, "false" otherwise |
void XMC_DMA_CH_TriggerSourceRequest | ( | XMC_DMA_t *const | dma, |
const uint8_t | channel, | ||
const XMC_DMA_CH_TRANSACTION_TYPE_t | type, | ||
bool | last | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
channel | Which DMA channel is being used? |
type | Transaction type: Single/burst mode |
last | Specify "true" if it is the last source request trigger, "false" otherwise |
void XMC_DMA_ClearOverrunStatus | ( | XMC_DMA_t *const | dma, |
const uint8_t | line | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
line | The line for which the overrun status must be cleared |
void XMC_DMA_ClearRequestLine | ( | XMC_DMA_t *const | dma, |
uint8_t | line | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
line | Which DLR (DMA line router) line should the function use? |
void XMC_DMA_Disable | ( | XMC_DMA_t *const | dma | ) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
void XMC_DMA_DisableRequestLine | ( | XMC_DMA_t *const | dma, |
uint8_t | line | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
line | Which DLR (DMA line router) line should the function use? |
void XMC_DMA_Enable | ( | XMC_DMA_t *const | dma | ) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
void XMC_DMA_EnableRequestLine | ( | XMC_DMA_t *const | dma, |
uint8_t | line, | ||
uint8_t | peripheral | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
line | Which DLR (DMA line router) line should the function use? |
peripheral | Which hardware peripheral is the GPDMA communicating with? |
uint32_t XMC_DMA_GetChannelsBlockCompleteStatus | ( | XMC_DMA_t *const | dma | ) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
uint32_t XMC_DMA_GetChannelsDestinationTransactionCompleteStatus | ( | XMC_DMA_t *const | dma | ) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
uint32_t XMC_DMA_GetChannelsErrorStatus | ( | XMC_DMA_t *const | dma | ) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
uint32_t XMC_DMA_GetChannelsSourceTransactionCompleteStatus | ( | XMC_DMA_t *const | dma | ) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
uint32_t XMC_DMA_GetChannelsTransferCompleteStatus | ( | XMC_DMA_t *const | dma | ) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
uint32_t XMC_DMA_GetEventStatus | ( | XMC_DMA_t *const | dma | ) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
bool XMC_DMA_GetOverrunStatus | ( | XMC_DMA_t *const | dma, |
const uint8_t | line | ||
) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
line | The line for which the overrun status is requested |
void XMC_DMA_Init | ( | XMC_DMA_t *const | dma | ) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
void XMC_DMA_IRQHandler | ( | XMC_DMA_t *const | dma | ) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |
The function handles the enabled GPDMA events and runs the user callback function registered by the user to service the event. To register a callback function, see XMC_DMA_CH_SetEventHandler()
bool XMC_DMA_IsEnabled | ( | const XMC_DMA_t *const | dma | ) |
dma | A constant pointer to XMC_DMA_t, pointing to the GPDMA base address |