AM64x MCU+ SDK  08.02.00

Introduction

This is UDMA driver channel related configuration parameters and API

Files

file  udma_ch.h
 UDMA Channel related parameters and API.
 

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_ChPdmaPrms
 UDMA PDMA channel Static TR parameters. More...
 
struct  Udma_ChStats
 UDMA channel statistics. More...
 
struct  Udma_ChObject
 Opaque UDMA channel object. 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_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 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_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...
 

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_MAPPED_GROUP_INVALID   ((uint32_t) 0xFFFF0004U)
 Macro used to specify that the Mapped Channel Group is invalid. More...
 
#define UDMA_DMSC_EXTENDED_CH_TYPE_BCDMA_BLK_CPY   ((uint8_t) 1U)
 DMSC Extended Channel Type Flag for BCDMA Block Copy. More...
 
#define UDMA_DMSC_EXTENDED_CH_TYPE_BCDMA_SPLIT_TR_TX   ((uint8_t) 0U)
 DMSC Extended Channel Type Flag for BCDMA split TR TX channels. More...
 

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_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...
 

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_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...
 

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...
 

Macro Definition Documentation

◆ UDMA_DMA_CH_INVALID

#define UDMA_DMA_CH_INVALID   ((uint32_t) 0xFFFF0000U)

Macro used to specify that DMA Channel ID is invalid. Used in the API Udma_chOpen.

◆ UDMA_DMA_CH_ANY

#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.

◆ UDMA_DMA_CH_NA

#define UDMA_DMA_CH_NA   ((uint32_t) 0xFFFF0002U)

Macro used to specify that the DMA Channel is not applicable for a particular mode.

◆ UDMA_MAPPED_GROUP_INVALID

#define UDMA_MAPPED_GROUP_INVALID   ((uint32_t) 0xFFFF0004U)

Macro used to specify that the Mapped Channel Group is invalid.

◆ UDMA_DMSC_EXTENDED_CH_TYPE_BCDMA_BLK_CPY

#define UDMA_DMSC_EXTENDED_CH_TYPE_BCDMA_BLK_CPY   ((uint8_t) 1U)

DMSC Extended Channel Type Flag for BCDMA Block Copy.

◆ UDMA_DMSC_EXTENDED_CH_TYPE_BCDMA_SPLIT_TR_TX

#define UDMA_DMSC_EXTENDED_CH_TYPE_BCDMA_SPLIT_TR_TX   ((uint8_t) 0U)

DMSC Extended Channel Type Flag for BCDMA split TR TX channels.

◆ UDMA_CH_FLAG_TX

#define UDMA_CH_FLAG_TX   ((uint32_t) 0x0001U)

TX channel flag.

◆ UDMA_CH_FLAG_RX

#define UDMA_CH_FLAG_RX   ((uint32_t) 0x0002U)

RX channel flag.

◆ UDMA_CH_FLAG_BLK_COPY

#define UDMA_CH_FLAG_BLK_COPY   ((uint32_t) 0x0004U)

Block copy mode channel flag.

◆ UDMA_CH_FLAG_PDMA

#define UDMA_CH_FLAG_PDMA   ((uint32_t) 0x0008U)

PDMA channel flag.

◆ UDMA_CH_FLAG_PSIL

#define UDMA_CH_FLAG_PSIL   ((uint32_t) 0x0010U)

PSIL channel flag meant for periperals like Ethernet, SA2UL.

◆ UDMA_CH_FLAG_HC

#define UDMA_CH_FLAG_HC   ((uint32_t) 0x0040U)

High capacity channel flag.

◆ UDMA_CH_FLAG_UHC

#define UDMA_CH_FLAG_UHC   ((uint32_t) 0x0080U)

Ultra high capacity channel flag.

◆ UDMA_CH_FLAG_MAPPED

#define UDMA_CH_FLAG_MAPPED   ((uint32_t) 0x0100U)

Mapped TX/RX channel flag.

◆ UDMA_CH_TYPE_TR_BLK_COPY

#define UDMA_CH_TYPE_TR_BLK_COPY
Value:
UDMA_CH_FLAG_TX | \
UDMA_CH_FLAG_RX)

TR block copy type - TX/RX pair.

◆ UDMA_CH_TYPE_TR_BLK_COPY_HC

#define UDMA_CH_TYPE_TR_BLK_COPY_HC
Value:
UDMA_CH_FLAG_TX | \
UDMA_CH_FLAG_RX | \
UDMA_CH_FLAG_HC)

High capacity TR block copy type - TX/RX pair.

◆ UDMA_CH_TYPE_TR_BLK_COPY_UHC

#define UDMA_CH_TYPE_TR_BLK_COPY_UHC
Value:
UDMA_CH_FLAG_TX | \
UDMA_CH_FLAG_RX | \
UDMA_CH_FLAG_UHC)

Ultra high capacity TR block copy type - TX/RX pair.

◆ UDMA_CH_TYPE_TX

#define UDMA_CH_TYPE_TX   (UDMA_CH_FLAG_TX | UDMA_CH_FLAG_PSIL)

TX channel type.

◆ UDMA_CH_TYPE_TX_HC

#define UDMA_CH_TYPE_TX_HC   (UDMA_CH_FLAG_TX | UDMA_CH_FLAG_PSIL | UDMA_CH_FLAG_HC)

High capacity TX channel type.

◆ UDMA_CH_TYPE_TX_UHC

#define UDMA_CH_TYPE_TX_UHC   (UDMA_CH_FLAG_TX | UDMA_CH_FLAG_PSIL | UDMA_CH_FLAG_UHC)

Ultra high capacity TX channel type.

◆ UDMA_CH_TYPE_RX

#define UDMA_CH_TYPE_RX   (UDMA_CH_FLAG_RX | UDMA_CH_FLAG_PSIL)

RX channel type.

◆ UDMA_CH_TYPE_RX_HC

#define UDMA_CH_TYPE_RX_HC   (UDMA_CH_FLAG_RX | UDMA_CH_FLAG_PSIL | UDMA_CH_FLAG_HC)

High capacity RX channel type.

◆ UDMA_CH_TYPE_RX_UHC

#define UDMA_CH_TYPE_RX_UHC   (UDMA_CH_FLAG_RX | UDMA_CH_FLAG_PSIL | UDMA_CH_FLAG_UHC)

Ultra high capacity RX channel type.

◆ UDMA_CH_TYPE_PDMA_TX

#define UDMA_CH_TYPE_PDMA_TX   (UDMA_CH_FLAG_TX | UDMA_CH_FLAG_PDMA)

PDMA TX channel type.

◆ UDMA_CH_TYPE_PDMA_TX_HC

#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.

◆ UDMA_CH_TYPE_PDMA_TX_UHC

#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.

◆ UDMA_CH_TYPE_PDMA_RX

#define UDMA_CH_TYPE_PDMA_RX   (UDMA_CH_FLAG_RX | UDMA_CH_FLAG_PDMA)

PDMA RX channel type.

◆ UDMA_CH_TYPE_PDMA_RX_HC

#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.

◆ UDMA_CH_TYPE_PDMA_RX_UHC

#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.

◆ UDMA_CH_TYPE_TX_MAPPED

#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.

◆ UDMA_CH_TYPE_RX_MAPPED

#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.

◆ UDMA_PDMA_ES_8BITS

#define UDMA_PDMA_ES_8BITS   ((uint32_t) 0x00U)

◆ UDMA_PDMA_ES_16BITS

#define UDMA_PDMA_ES_16BITS   ((uint32_t) 0x01U)

◆ UDMA_PDMA_ES_24BITS

#define UDMA_PDMA_ES_24BITS   ((uint32_t) 0x02U)

◆ UDMA_PDMA_ES_32BITS

#define UDMA_PDMA_ES_32BITS   ((uint32_t) 0x03U)

◆ UDMA_PDMA_ES_64BITS

#define UDMA_PDMA_ES_64BITS   ((uint32_t) 0x04U)

◆ UDMA_PDMA_ES_DONTCARE

#define UDMA_PDMA_ES_DONTCARE   ((uint32_t) 0x00U)

Set this for MCAN element size - not applicable.

Function Documentation

◆ Udma_chOpen()

int32_t Udma_chOpen ( Udma_DrvHandle  drvHandle,
Udma_ChHandle  chHandle,
uint32_t  chType,
const Udma_ChPrms chPrms 
)

UDMA open channel.

Opens the UDMA channel based on the channel parameters. This also does the PSILCFG pairing based on the peer thread ID provided.

Requirement: DOX_REQ_TAG(PDK-2578)

Parameters
drvHandle[IN] UDMA driver handle pointer passed during Udma_init
chHandle[IN/OUT] UDMA channel handle. The caller need to allocate memory for this object and pass this pointer to all further APIs. The caller should not change any parameters as this is owned and maintained by the driver. This parameter can't be NULL.
chType[IN] UDMA channel type. Refer Udma_ChType.
chPrms[IN] UDMA channel parameters. This parameter can't be NULL.
Returns
Udma_ErrorCodes

◆ Udma_chClose()

int32_t Udma_chClose ( Udma_ChHandle  chHandle)

UDMA close channel.

Closes the UDMA channel and frees all associated resources.

Requirement: DOX_REQ_TAG(PDK-2579)

Parameters
chHandle[IN] UDMA channel handle. This parameter can't be NULL.
Returns
Udma_ErrorCodes

◆ Udma_chConfigTx()

int32_t Udma_chConfigTx ( Udma_ChHandle  chHandle,
const Udma_ChTxPrms txPrms 
)

UDMA configure TX channel.

Configures the TX channel parameters. Note: This is applicable only when the channel type is TX

Note: This API can't be called after channel enable.

Requirement: DOX_REQ_TAG(PDK-2580)

Parameters
chHandle[IN] UDMA channel handle. This parameter can't be NULL.
txPrms[IN] UDMA TX channel parameter. Refer Udma_ChTxPrms.
Returns
Udma_ErrorCodes

◆ Udma_chConfigRx()

int32_t Udma_chConfigRx ( Udma_ChHandle  chHandle,
const Udma_ChRxPrms rxPrms 
)

UDMA configure RX channel.

Configures the RX channel parameters. Note: This is applicable only when the channel type is RX In case of BCDMA Block Copy, there is no need to configure RX Channel. Therfore the function returns gracefully, without doing anything.

Note: This API can't be called after channel enable.

Requirement: DOX_REQ_TAG(PDK-2581)

Parameters
chHandle[IN] UDMA channel handle. This parameter can't be NULL.
rxPrms[IN] UDMA RX channel parameter. Refer Udma_ChRxPrms.
Returns
Udma_ErrorCodes

◆ Udma_chConfigPdma()

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.

This configures the PDMA channel static X,Y,Z parameters.

Requirement: DOX_REQ_TAG(PDK-2583)

Parameters
chHandle[IN] UDMA channel handle. This parameter can't be NULL.
pdmaPrms[IN] UDMA RX channel parameter. Refer Udma_ChPdmaPrms.
Returns
Udma_ErrorCodes

◆ Udma_chEnable()

int32_t Udma_chEnable ( Udma_ChHandle  chHandle)

UDMA channel enable API.

This function will enable the UDMA channel.

Requirement: DOX_REQ_TAG(PDK-2584)

Parameters
chHandle[IN] UDMA channel handle. This parameter can't be NULL.
Returns
Udma_ErrorCodes

◆ Udma_chDisable()

int32_t Udma_chDisable ( Udma_ChHandle  chHandle,
uint32_t  timeout 
)

UDMA channel teardown and disable API.

This function will perform the channel teardown and eventually disables the UDMA channel. This initiates the force teardown sequence based on the channel type and wait for teardown to complete gracefully. If the teardown doesn't complete within the timeout provided, then this will initiate a force teardown sequence.

Caution: This API is blocking. Hence cannot be called from ISR context!!

Requirement: DOX_REQ_TAG(PDK-2585)

Parameters
chHandle[IN] UDMA channel handle. This parameter can't be NULL.
timeout[IN] Timeout in ms. Use SystemP_WAIT_FOREVER to wait forever.
Returns
Udma_ErrorCodes

◆ Udma_chPause()

int32_t Udma_chPause ( Udma_ChHandle  chHandle)

UDMA channel pause API.

This function will pause the UDMA channel by setting the pause bit of the UDMAP runtime register.

Requirement: DOX_REQ_TAG(PDK-2977)

Parameters
chHandle[IN] UDMA channel handle. This parameter can't be NULL.
Returns
Udma_ErrorCodes

◆ Udma_chResume()

int32_t Udma_chResume ( Udma_ChHandle  chHandle)

UDMA channel resume API.

This function will resume the UDMA channel by clearing the pause bit of the UDMAP runtime register.

Requirement: DOX_REQ_TAG(PDK-2977)

Parameters
chHandle[IN] UDMA channel handle. This parameter can't be NULL.
Returns
Udma_ErrorCodes

◆ Udma_chGetNum()

uint32_t Udma_chGetNum ( Udma_ChHandle  chHandle)

Returns the channel number offset with in a channel type - TX, RX and External (UTC) channel types.

In case of UTC type, this returns the relative offset from the start of UTC it belongs to (and not from the external channel start).

Parameters
chHandle[IN] UDMA channel handle. This parameter can't be NULL.
Returns
Channel number. Returns UDMA_DMA_CH_INVALID for error.

◆ Udma_chGetFqRingHandle()

Udma_RingHandle Udma_chGetFqRingHandle ( Udma_ChHandle  chHandle)

Returns the default free ring handle of the channel.

Parameters
chHandle[IN] UDMA channel handle. This parameter can't be NULL.
Returns
Free ring handle. Returns NULL for error.

◆ Udma_chGetCqRingHandle()

Udma_RingHandle Udma_chGetCqRingHandle ( Udma_ChHandle  chHandle)

Returns the default completion ring handle of the channel.

Parameters
chHandle[IN] UDMA channel handle. This parameter can't be NULL.
Returns
Completion ring handle. Returns NULL for error.

◆ Udma_chGetTdCqRingHandle()

Udma_RingHandle Udma_chGetTdCqRingHandle ( Udma_ChHandle  chHandle)

Returns the teardown completion ring handle of the channel.

Parameters
chHandle[IN] UDMA channel handle. This parameter can't be NULL.
Returns
Teardown completion ring handle. Returns NULL for error.

◆ Udma_chGetFqRingNum()

uint16_t Udma_chGetFqRingNum ( Udma_ChHandle  chHandle)

Returns the default free ring number to be programmed in descriptor.

Parameters
chHandle[IN] UDMA channel handle. This parameter can't be NULL.
Returns
Free ring number. Returns UDMA_RING_INVALID for error.

◆ Udma_chGetCqRingNum()

uint16_t Udma_chGetCqRingNum ( Udma_ChHandle  chHandle)

Returns the default completion ring number to be programmed in descriptor.

Requirement: DOX_REQ_TAG(PDK-2586)

Parameters
chHandle[IN] UDMA channel handle. This parameter can't be NULL.
Returns
Completion ring number. Returns UDMA_RING_INVALID for error.

◆ Udma_chGetDefaultFlowHandle()

Udma_FlowHandle Udma_chGetDefaultFlowHandle ( Udma_ChHandle  chHandle)

Returns the default flow handle of the RX channel.

Parameters
chHandle[IN] UDMA channel handle. This parameter can't be NULL.
Returns
Default flow handle. Returns NULL for error.

◆ Udma_chGetTriggerEvent()

uint32_t Udma_chGetTriggerEvent ( Udma_ChHandle  chHandle,
uint32_t  trigger 
)

Returns the global trigger event for the channel.

This function will return the appropriate global 0/1 trigger event for the channel.

Notes: Trigger is not supported for external channels and the function will return UDMA_EVENT_INVALID.

Parameters
chHandle[IN] UDMA channel handle. This parameter can't be NULL.
trigger[IN] Global0 or Global 1 Trigger - refer CSL_UdmapTrFlagsTrigger
Returns
Global trigger event

◆ Udma_chGetSwTriggerRegister()

void* Udma_chGetSwTriggerRegister ( Udma_ChHandle  chHandle)

Returns the software trigger register address for the channel.

This function will return the appropriate SW trigger register. Incase of UDMAP channels, it returns the 32-bit TX SWTRIG register address. Incase of DRU channels, it returns the 64-bit DRU CHRT_SWTRIG register address.

Notes: SW trigger is not supported for RX channels. Incase of TX channels, only global trigger 0 is supported. Incase of DRU channels, global trigger 0/1 and local events are supported.

Requirement: DOX_REQ_TAG(PDK-2594)

Parameters
chHandle[IN] UDMA channel handle. This parameter can't be NULL.
Returns
SW trigger register address

◆ Udma_chSetSwTrigger()

int32_t Udma_chSetSwTrigger ( Udma_ChHandle  chHandle,
uint32_t  trigger 
)

Sets the software trigger register based on the trigger mode provided.

This function will set the appropriate SW trigger register. Incase of UDMAP channels, it will set in the TX SWTRIG register. Incase of DRU channels, it will set in the DRU CHRT_SWTRIG register.

Notes: SW trigger is not supported for RX channels. Incase of TX channels, only global trigger 0 is supported. Incase of DRU channels, global trigger 0/1 and local events are supported.

Requirement: DOX_REQ_TAG(PDK-2594)

Parameters
chHandle[IN] UDMA channel handle. This parameter can't be NULL.
trigger[IN] Global0 or Global 1 Trigger - refer CSL_UdmapTrFlagsTrigger
Returns
Udma_ErrorCodes

◆ Udma_chSetChaining()

int32_t Udma_chSetChaining ( Udma_ChHandle  triggerChHandle,
Udma_ChHandle  chainedChHandle,
uint32_t  trigger 
)

Chains the trigger channel with the chained channel.

This programs the trigger channel TR event register (OES) to the global trigger (0 or 1) event of the chained channel.

Once this is done, the application should set the TR trigger (0 or 1) of the trigger channel while submitting TR to the trigger channel. Based on the trigger type (full, ICNT0, INCT1, ICNT3), the trigger channel will trigger the "chained" channel through the channel OES.

Note: Only global0 and global1 triggers are supported.

Parameters
triggerChHandle[IN] UDMA channel handle which triggers the chain. This parameter can't be NULL.
chainedChHandle[IN] UDMA channel handle which gets triggered. This parameter can't be NULL.
trigger[IN] Global0 or Global 1 Trigger - refer CSL_UdmapTrFlagsTrigger
Returns
Udma_ErrorCodes

◆ Udma_chBreakChaining()

int32_t Udma_chBreakChaining ( Udma_ChHandle  triggerChHandle,
Udma_ChHandle  chainedChHandle 
)

Breaks the chaining by resetting the trigger channel's OES.

Note: Only global0 and global1 triggers are supported.

Parameters
triggerChHandle[IN] UDMA channel handle which triggers the chain. This parameter can't be NULL.
chainedChHandle[IN] UDMA channel handle which gets triggered. This parameter can't be NULL.
Returns
Udma_ErrorCodes

◆ UdmaChPrms_init()

void UdmaChPrms_init ( Udma_ChPrms chPrms,
uint32_t  chType 
)

Udma_ChPrms structure init function.

Parameters
chPrms[IN] Pointer to Udma_ChPrms structure.
chType[IN] UDMA channel type. Refer Udma_ChType.

◆ UdmaChTxPrms_init()

void UdmaChTxPrms_init ( Udma_ChTxPrms txPrms,
uint32_t  chType 
)

Udma_ChTxPrms structure init function.

Parameters
txPrms[IN] Pointer to Udma_ChTxPrms structure.
chType[IN] UDMA channel type. Refer Udma_ChType.

◆ UdmaChRxPrms_init()

void UdmaChRxPrms_init ( Udma_ChRxPrms rxPrms,
uint32_t  chType 
)

Udma_ChRxPrms structure init function.

Parameters
rxPrms[IN] Pointer to Udma_ChRxPrms structure.
chType[IN] UDMA channel type. Refer Udma_ChType.

◆ UdmaChPdmaPrms_init()

void UdmaChPdmaPrms_init ( Udma_ChPdmaPrms pdmaPrms)

Udma_ChPdmaPrms structure init function.

Parameters
pdmaPrms[IN] Pointer to Udma_ChPdmaPrms structure.

◆ Udma_chGetStats()

int32_t Udma_chGetStats ( Udma_ChHandle  chHandle,
Udma_ChStats chStats 
)

Get real-time channel statistics.

Requirement: PRSDK-5609

Parameters
chHandle[IN] UDMA channel handle. This parameter can't be NULL.
chStats[IN] Pointer to Udma_ChStats. This parameter can't be NULL.
Returns
Udma_ErrorCodes

◆ Udma_getPeerData()

int32_t Udma_getPeerData ( Udma_ChHandle  chHandle,
uint32_t *  peerData 
)

Get real-time peer data which contains number of bytes written.

Parameters
chHandle[IN] UDMA channel handle. This parameter can't be NULL.
peerData[INOUT] Pointer to peer data.
Returns
Udma_ErrorCodes

◆ Udma_clearPeerData()

int32_t Udma_clearPeerData ( Udma_ChHandle  chHandle,
uint32_t  peerData 
)

Clear real-time peer data which contains number of bytes written.

Parameters
chHandle[IN] UDMA channel handle. This parameter can't be NULL.
peerData[IN] Peer data.
Returns
Udma_ErrorCodes
UDMA_CH_FLAG_BLK_COPY
#define UDMA_CH_FLAG_BLK_COPY
Block copy mode channel flag.
Definition: udma_ch.h:103