AM275 FreeRTOS SDK  11.00.00
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages

Introduction

UDMA Channel related parameters and API.

Go to the source code of this file.

Data Structures

struct  Udma_ChPrms
 UDMA channel open parameters. More...
 
struct  Udma_ChTxPrms
 UDMA TX channel parameters. More...
 
struct  Udma_ChRxPrms
 UDMA RX channel parameters. More...
 
struct  Udma_ChUtcPrms
 UDMA UTC channel parameters. More...
 
struct  Udma_ChPdmaPrms
 UDMA PDMA channel Static TR parameters. More...
 
struct  Udma_ChStats
 UDMA channel statistics. More...
 
struct  Udma_ChObject
 Opaque UDMA channel object. More...
 

Macros

#define UDMA_DMA_CH_INVALID   ((uint32_t) 0xFFFF0000U)
 Macro used to specify that DMA Channel ID is invalid. Used in the API Udma_chOpen. More...
 
#define UDMA_DMA_CH_ANY   ((uint32_t) 0xFFFF0001U)
 Macro used to specify any available DMA Channel while requesting one. Used in the API Udma_chOpen. More...
 
#define UDMA_DMA_CH_NA   ((uint32_t) 0xFFFF0002U)
 Macro used to specify that the DMA Channel is not applicable for a particular mode. More...
 
#define UDMA_UTC_ID_INVALID   ((uint32_t) 0xFFFF0003U)
 Macro used to specify that the UTC ID is invalid. More...
 
#define UDMA_MAPPED_GROUP_INVALID   ((uint32_t) 0xFFFF0004U)
 Macro used to specify that the Mapped Channel Group is invalid. More...
 
#define UDMA_SYSFW_EXTENDED_CH_TYPE_BCDMA_BLK_CPY   ((uint8_t) 1U)
 SYSFW Extended Channel Type Flag for BCDMA Block Copy. More...
 
#define UDMA_SYSFW_EXTENDED_CH_TYPE_BCDMA_SPLIT_TR_TX   ((uint8_t) 0U)
 SYSFW Extended Channel Type Flag for BCDMA split TR TX channels. More...
 
#define UDMA_DRV_CH_OBJ_SIZE   (178U)
 
UDMA Channel Flag

UDMA channel flags bit field used to form the channel type.

#define UDMA_CH_FLAG_TX   ((uint32_t) 0x0001U)
 TX channel flag. More...
 
#define UDMA_CH_FLAG_RX   ((uint32_t) 0x0002U)
 RX channel flag. More...
 
#define UDMA_CH_FLAG_BLK_COPY   ((uint32_t) 0x0004U)
 Block copy mode channel flag. More...
 
#define UDMA_CH_FLAG_PDMA   ((uint32_t) 0x0008U)
 PDMA channel flag. More...
 
#define UDMA_CH_FLAG_PSIL   ((uint32_t) 0x0010U)
 PSIL channel flag meant for periperals like Ethernet, SA2UL. More...
 
#define UDMA_CH_FLAG_UTC   ((uint32_t) 0x0020U)
 UTC channel flag. More...
 
#define UDMA_CH_FLAG_HC   ((uint32_t) 0x0040U)
 High capacity channel flag. More...
 
#define UDMA_CH_FLAG_UHC   ((uint32_t) 0x0080U)
 Ultra high capacity channel flag. More...
 
#define UDMA_CH_FLAG_MAPPED   ((uint32_t) 0x0100U)
 Mapped TX/RX channel flag. More...
 
#define UDMA_CH_FLAG_TR   ((uint32_t) 0x0200U)
 TR mode channel flag. More...
 
UDMA Channel Type

UDMA channel type formed based on channel flags.

#define UDMA_CH_TYPE_TR_BLK_COPY
 TR block copy type - TX/RX pair. More...
 
#define UDMA_CH_TYPE_TR_BLK_COPY_HC
 High capacity TR block copy type - TX/RX pair. More...
 
#define UDMA_CH_TYPE_TR_BLK_COPY_UHC
 Ultra high capacity TR block copy type - TX/RX pair. More...
 
#define UDMA_CH_TYPE_TX   (UDMA_CH_FLAG_TX | UDMA_CH_FLAG_PSIL)
 TX channel type. More...
 
#define UDMA_CH_TYPE_TX_HC   (UDMA_CH_FLAG_TX | UDMA_CH_FLAG_PSIL | UDMA_CH_FLAG_HC)
 High capacity TX channel type. More...
 
#define UDMA_CH_TYPE_TX_UHC   (UDMA_CH_FLAG_TX | UDMA_CH_FLAG_PSIL | UDMA_CH_FLAG_UHC)
 Ultra high capacity TX channel type. More...
 
#define UDMA_CH_TYPE_RX   (UDMA_CH_FLAG_RX | UDMA_CH_FLAG_PSIL)
 RX channel type. More...
 
#define UDMA_CH_TYPE_RX_HC   (UDMA_CH_FLAG_RX | UDMA_CH_FLAG_PSIL | UDMA_CH_FLAG_HC)
 High capacity RX channel type. More...
 
#define UDMA_CH_TYPE_RX_UHC   (UDMA_CH_FLAG_RX | UDMA_CH_FLAG_PSIL | UDMA_CH_FLAG_UHC)
 Ultra high capacity RX channel type. More...
 
#define UDMA_CH_TYPE_PDMA_TX   (UDMA_CH_FLAG_TX | UDMA_CH_FLAG_PDMA)
 PDMA TX channel type. More...
 
#define UDMA_CH_TYPE_PDMA_TX_HC   (UDMA_CH_FLAG_TX | UDMA_CH_FLAG_PDMA | UDMA_CH_FLAG_HC)
 High capacity PDMA TX channel type. More...
 
#define UDMA_CH_TYPE_PDMA_TX_UHC   (UDMA_CH_FLAG_TX | UDMA_CH_FLAG_PDMA | UDMA_CH_FLAG_UHC)
 Ultra high capacity PDMA TX channel type. More...
 
#define UDMA_CH_TYPE_PDMA_RX   (UDMA_CH_FLAG_RX | UDMA_CH_FLAG_PDMA)
 PDMA RX channel type. More...
 
#define UDMA_CH_TYPE_PDMA_RX_HC   (UDMA_CH_FLAG_RX | UDMA_CH_FLAG_PDMA | UDMA_CH_FLAG_HC)
 High capacity PDMA RX channel type. More...
 
#define UDMA_CH_TYPE_PDMA_RX_UHC   (UDMA_CH_FLAG_RX | UDMA_CH_FLAG_PDMA | UDMA_CH_FLAG_UHC)
 Ultra high capacity PDMA RX channel type. More...
 
#define UDMA_CH_TYPE_TX_TR   (UDMA_CH_FLAG_TX | UDMA_CH_FLAG_PSIL | UDMA_CH_FLAG_TR)
 TX channel type. More...
 
#define UDMA_CH_TYPE_TX_HC_TR   (UDMA_CH_FLAG_TX | UDMA_CH_FLAG_PSIL | UDMA_CH_FLAG_HC | UDMA_CH_FLAG_TR)
 High capacity TX channel type. More...
 
#define UDMA_CH_TYPE_TX_UHC_TR   (UDMA_CH_FLAG_TX | UDMA_CH_FLAG_PSIL | UDMA_CH_FLAG_UHC | UDMA_CH_FLAG_TR)
 Ultra high capacity TX channel type. More...
 
#define UDMA_CH_TYPE_RX_TR   (UDMA_CH_FLAG_RX | UDMA_CH_FLAG_PSIL | UDMA_CH_FLAG_TR)
 RX channel type. More...
 
#define UDMA_CH_TYPE_RX_HC_TR   (UDMA_CH_FLAG_RX | UDMA_CH_FLAG_PSIL | UDMA_CH_FLAG_HC | UDMA_CH_FLAG_TR)
 High capacity RX channel type. More...
 
#define UDMA_CH_TYPE_RX_UHC_TR   (UDMA_CH_FLAG_RX | UDMA_CH_FLAG_PSIL | UDMA_CH_FLAG_UHC | UDMA_CH_FLAG_TR)
 Ultra high capacity RX channel type. More...
 
#define UDMA_CH_TYPE_PDMA_TX_TR   (UDMA_CH_FLAG_TX | UDMA_CH_FLAG_PDMA | UDMA_CH_FLAG_TR)
 PDMA TX channel type. More...
 
#define UDMA_CH_TYPE_PDMA_TX_HC_TR   (UDMA_CH_FLAG_TX | UDMA_CH_FLAG_PDMA | UDMA_CH_FLAG_HC | UDMA_CH_FLAG_TR)
 High capacity PDMA TX channel type. More...
 
#define UDMA_CH_TYPE_PDMA_TX_UHC_TR   (UDMA_CH_FLAG_TX | UDMA_CH_FLAG_PDMA | UDMA_CH_FLAG_UHC | UDMA_CH_FLAG_TR)
 Ultra high capacity PDMA TX channel type. More...
 
#define UDMA_CH_TYPE_PDMA_RX_TR   (UDMA_CH_FLAG_RX | UDMA_CH_FLAG_PDMA | UDMA_CH_FLAG_TR)
 PDMA RX channel type. More...
 
#define UDMA_CH_TYPE_PDMA_RX_HC_TR   (UDMA_CH_FLAG_RX | UDMA_CH_FLAG_PDMA | UDMA_CH_FLAG_HC | UDMA_CH_FLAG_TR)
 High capacity PDMA RX channel type. More...
 
#define UDMA_CH_TYPE_PDMA_RX_UHC_TR   (UDMA_CH_FLAG_RX | UDMA_CH_FLAG_PDMA | UDMA_CH_FLAG_UHC | UDMA_CH_FLAG_TR)
 Ultra high capacity PDMA RX channel type. More...
 
#define UDMA_CH_TYPE_TX_MAPPED   (UDMA_CH_FLAG_TX | UDMA_CH_FLAG_PSIL | UDMA_CH_FLAG_MAPPED)
 Mapped TX channel. This could be different type of mapped TX channels. See Udma_MappedTxGrpSoc for differnt types of SOC specific mapped TX channels. More...
 
#define UDMA_CH_TYPE_RX_MAPPED   (UDMA_CH_FLAG_RX | UDMA_CH_FLAG_PSIL | UDMA_CH_FLAG_MAPPED)
 Mapped RX channel. This could be different type of mapped RX channels. See Udma_MappedRxGrpSoc for differnt types of SOC specific mapped RX channels. More...
 
#define UDMA_CH_TYPE_UTC   (UDMA_CH_FLAG_UTC)
 UTC channel. This could be. More...
 
UDMA PDMA element size

#define UDMA_PDMA_ES_8BITS   ((uint32_t) 0x00U)
 
#define UDMA_PDMA_ES_16BITS   ((uint32_t) 0x01U)
 
#define UDMA_PDMA_ES_24BITS   ((uint32_t) 0x02U)
 
#define UDMA_PDMA_ES_32BITS   ((uint32_t) 0x03U)
 
#define UDMA_PDMA_ES_64BITS   ((uint32_t) 0x04U)
 
#define UDMA_PDMA_ES_DONTCARE   ((uint32_t) 0x00U)
 Set this for MCAN element size - not applicable. More...
 

Functions

int32_t Udma_chOpen (Udma_DrvHandle drvHandle, Udma_ChHandle chHandle, uint32_t chType, const Udma_ChPrms *chPrms)
 UDMA open channel. More...
 
int32_t Udma_chClose (Udma_ChHandle chHandle)
 UDMA close channel. More...
 
int32_t Udma_chConfigTx (Udma_ChHandle chHandle, const Udma_ChTxPrms *txPrms)
 UDMA configure TX channel. More...
 
int32_t Udma_chConfigRx (Udma_ChHandle chHandle, const Udma_ChRxPrms *rxPrms)
 UDMA configure RX channel. More...
 
int32_t Udma_chConfigUtc (Udma_ChHandle chHandle, const Udma_ChUtcPrms *utcPrms)
 UDMA configure UTC channel. More...
 
int32_t Udma_chConfigPdma (Udma_ChHandle chHandle, const Udma_ChPdmaPrms *pdmaPrms)
 UDMA configure PDMA channel (peerChNum as part of Udma_ChPrms) paired with the UDMAP channel. More...
 
int32_t Udma_chEnable (Udma_ChHandle chHandle)
 UDMA channel enable API. More...
 
int32_t Udma_chDisable (Udma_ChHandle chHandle, uint32_t timeout)
 UDMA channel teardown and disable API. More...
 
int32_t Udma_chPause (Udma_ChHandle chHandle)
 UDMA channel pause API. More...
 
int32_t Udma_chResume (Udma_ChHandle chHandle)
 UDMA channel resume API. More...
 
uint32_t Udma_chGetNum (Udma_ChHandle chHandle)
 Returns the channel number offset with in a channel type - TX, RX and External (UTC) channel types. More...
 
Udma_RingHandle Udma_chGetFqRingHandle (Udma_ChHandle chHandle)
 Returns the default free ring handle of the channel. More...
 
Udma_RingHandle Udma_chGetCqRingHandle (Udma_ChHandle chHandle)
 Returns the default completion ring handle of the channel. More...
 
Udma_RingHandle Udma_chGetTdCqRingHandle (Udma_ChHandle chHandle)
 Returns the teardown completion ring handle of the channel. More...
 
uint16_t Udma_chGetFqRingNum (Udma_ChHandle chHandle)
 Returns the default free ring number to be programmed in descriptor. More...
 
uint16_t Udma_chGetCqRingNum (Udma_ChHandle chHandle)
 Returns the default completion ring number to be programmed in descriptor. More...
 
Udma_FlowHandle Udma_chGetDefaultFlowHandle (Udma_ChHandle chHandle)
 Returns the default flow handle of the RX channel. More...
 
uint32_t Udma_chGetTriggerEvent (Udma_ChHandle chHandle, uint32_t trigger)
 Returns the global trigger event for the channel. More...
 
void * Udma_chGetSwTriggerRegister (Udma_ChHandle chHandle)
 Returns the software trigger register address for the channel. More...
 
int32_t Udma_chSetSwTrigger (Udma_ChHandle chHandle, uint32_t trigger)
 Sets the software trigger register based on the trigger mode provided. More...
 
int32_t Udma_chSetChaining (Udma_ChHandle triggerChHandle, Udma_ChHandle chainedChHandle, uint32_t trigger)
 Chains the trigger channel with the chained channel. More...
 
int32_t Udma_chBreakChaining (Udma_ChHandle triggerChHandle, Udma_ChHandle chainedChHandle)
 Breaks the chaining by resetting the trigger channel's OES. More...
 
void UdmaChPrms_init (Udma_ChPrms *chPrms, uint32_t chType)
 Udma_ChPrms structure init function. More...
 
void UdmaChTxPrms_init (Udma_ChTxPrms *txPrms, uint32_t chType)
 Udma_ChTxPrms structure init function. More...
 
void UdmaChRxPrms_init (Udma_ChRxPrms *rxPrms, uint32_t chType)
 Udma_ChRxPrms structure init function. More...
 
void UdmaChUtcPrms_init (Udma_ChUtcPrms *utcPrms)
 Udma_ChUtcPrms structure init function. More...
 
int32_t Udma_chRingQueueRaw (Udma_ChHandle chHandle, uint8_t *phyDescMem, uint64_t noEleCnt)
 Queue TR into channels ring. More...
 
int32_t Udma_chRingRingDbRaw (Udma_ChHandle chHandle, uint64_t noOfEntries)
 Ring Forward door bell. More...
 
int32_t Udma_chRingDeQueueRaw (Udma_ChHandle chHandle, uint64_t noElem, uint64_t *eleInRing)
 De Queue elements from the ring. More...
 
int32_t Udma_chRingRingRvrDbRaw (Udma_ChHandle chHandle, uint64_t noOfEntries)
 Ring Forward door bell. More...
 
void UdmaChPdmaPrms_init (Udma_ChPdmaPrms *pdmaPrms)
 Udma_ChPdmaPrms structure init function. More...
 
int32_t Udma_chGetStats (Udma_ChHandle chHandle, Udma_ChStats *chStats)
 Get real-time channel statistics. More...
 
int32_t Udma_chDecStats (Udma_ChHandle chHandle, Udma_ChStats *chStats)
 Decrement real-time channel statistics. More...
 
int32_t Udma_getPeerData (Udma_ChHandle chHandle, uint32_t *peerData)
 Get real-time peer data which contains number of bytes written. More...
 
int32_t Udma_clearPeerData (Udma_ChHandle chHandle, uint32_t peerData)
 Clear real-time peer data which contains number of bytes written. More...
 
int32_t Udma_chReset (Udma_ChHandle chHandle)
 Hard reset the channel if teardown fails. More...
 
int32_t Udma_chGetChanEnStatus (Udma_ChHandle chHandle, uint8_t *chEnableStat)
 Get the channel enable status. More...