AM263x MCU+ SDK  10.00.00

Introduction

This module contains APIs to program and use the EDMA.

Files

file  edma/v0/edma.h
 This file contains the prototype of EDMA driver APIs.
 

Data Structures

struct  __attribute__
 EDMA Parameter RAM Set in User Configurable format This is a mapping of the EDMA PaRAM set provided to the user for ease of modification of the individual fields. More...
 
struct  EDMA_ResourceObject
 EDMA resource allocation structure. More...
 
struct  EDMA_InitParams
 EDMA initialization structure used for EDMAInitialize. More...
 
struct  EDMA_Params
 EDMA open parameters passed to EDMA_open() function. More...
 
struct  Edma_IntrObject
 EDMA interrupt configuration object. The object is passed to the EDMA_registerIntr() function. This is held by the driver till the EDMA_unregisterIntr() function is called with this obect. The application should not modify this object in between. More...
 
struct  EDMA_Object
 EDMA driver object. More...
 
struct  EDMA_Attrs
 EDMA instance attributes - used during init time. More...
 
struct  EDMA_Config
 EDMA Instance Configuration. Pointer to this object is returned as handle by driver open. More...
 

Functions

void EDMA_initParamsInit (EDMA_InitParams *initParam)
 Structure initialization function for EDMA_InitParams. More...
 
void EDMA_ccPaRAMEntry_init (EDMACCPaRAMEntry *paramEntry)
 Clear a PaRAM Set . More...
 
void EDMA_enableChInShadowRegRegion (uint32_t baseAddr, uint32_t regionId, uint32_t chType, uint32_t chNum)
 Enable channel to Shadow region mapping. More...
 
void EDMA_disableChInShadowRegRegion (uint32_t baseAddr, uint32_t regionId, uint32_t chType, uint32_t chNum)
 Disable channel to Shadow region mapping. More...
 
void EDMA_channelToParamMap (uint32_t baseAddr, uint32_t channel, uint32_t paramSet)
 This function maps DMA channel to any of the PaRAM sets in the PaRAM memory map. More...
 
void EDMA_mapChToEvtQ (uint32_t baseAddr, uint32_t chType, uint32_t chNum, uint32_t evtQNum)
 Map channel to Event Queue. More...
 
void EDMA_unmapChToEvtQ (uint32_t baseAddr, uint32_t chType, uint32_t chNum)
 Remove Mapping of channel to Event Queue. More...
 
void EDMA_mapQdmaChToPaRAM (uint32_t baseAddr, uint32_t chNum, const uint32_t *paRAMId)
 Enables the user to map a QDMA channel to PaRAM set This API Needs to be called before programming the paRAM sets for the QDMA Channels.Application needs to maitain the paRAMId provided by this API.This paRAMId is used to set paRAM and get paRAM. Refer corresponding API's for more details. More...
 
uint32_t EDMA_getMappedPaRAM (uint32_t baseAddr, uint32_t chNum, uint32_t chType, uint32_t *paramId)
 Returns the PaRAM associated with the DMA/QDMA channel. More...
 
void EDMA_setQdmaTrigWord (uint32_t baseAddr, uint32_t chNum, uint32_t trigWord)
 Assign a Trigger Word to the specified QDMA channel. More...
 
void EDMA_clrMissEvtRegion (uint32_t baseAddr, uint32_t regionId, uint32_t chNum)
 Enables the user to Clear any missed event. More...
 
void EDMA_qdmaClrMissEvtRegion (uint32_t baseAddr, uint32_t regionId, uint32_t chNum)
 Enables the user to Clear any QDMA missed event. More...
 
void EDMA_clrCCErr (uint32_t baseAddr, uint32_t flags)
 Enables the user to Clear any Channel controller Errors. More...
 
void EDMA_setEvtRegion (uint32_t baseAddr, uint32_t regionId, uint32_t chNum)
 Enables the user to Set an event. This API helps user to manually set events to initiate DMA transfer requests. More...
 
void EDMA_clrEvtRegion (uint32_t baseAddr, uint32_t regionId, uint32_t chNum)
 Enables the user to Clear an event. More...
 
void EDMA_enableDmaEvtRegion (uint32_t baseAddr, uint32_t regionId, uint32_t chNum)
 Enables the user to enable an DMA event. More...
 
void EDMA_disableDmaEvtRegion (uint32_t baseAddr, uint32_t regionId, uint32_t chNum)
 Enables the user to Disable an DMA event. More...
 
void EDMA_enableQdmaEvtRegion (uint32_t baseAddr, uint32_t regionId, uint32_t chNum)
 Enables the user to enable an QDMA event. More...
 
void EDMA_disableQdmaEvtRegion (uint32_t baseAddr, uint32_t regionId, uint32_t chNum)
 Enables the user to disable an QDMA event. More...
 
uint32_t EDMA_getIntrStatusRegion (uint32_t baseAddr, uint32_t regionId)
 This function returns interrupts status of those events which is less than 32. More...
 
void EDMA_enableEvtIntrRegion (uint32_t baseAddr, uint32_t regionId, uint32_t chNum)
 Enables the user to enable the transfer completion interrupt generation by the EDMACC for all DMA/QDMA channels. More...
 
void EDMA_disableEvtIntrRegion (uint32_t baseAddr, uint32_t regionId, uint32_t chNum)
 Enables the user to clear CC interrupts. More...
 
void EDMA_clrIntrRegion (uint32_t baseAddr, uint32_t regionId, uint32_t value)
 Enables the user to Clear an Interrupt. More...
 
uint32_t EDMA_getEnabledIntrRegion (uint32_t baseAddr, uint32_t regionId)
 This function returns interrupt enable status of events which are less than 32. More...
 
uint32_t EDMA_getEnabledIntrHighRegion (uint32_t baseAddr, uint32_t regionId)
 This function returns interrupt enable status of events which are more than 32. More...
 
void EDMA_getPaRAM (uint32_t baseAddr, uint32_t paRAMId, EDMACCPaRAMEntry *currPaRAM)
 Retrieve existing PaRAM set associated with specified logical channel (DMA/Link). More...
 
void EDMA_qdmaGetPaRAM (uint32_t baseAddr, uint32_t paRAMId, EDMACCPaRAMEntry *currPaRAM)
 Retrieve existing PaRAM set associated with specified logical channel (QDMA). More...
 
void EDMA_setPaRAM (uint32_t baseAddr, uint32_t paRAMId, const EDMACCPaRAMEntry *newPaRAM)
 Copy the user specified PaRAM Set onto the PaRAM Set associated with the logical channel (DMA/Link). More...
 
void EDMA_qdmaSetPaRAM (uint32_t baseAddr, uint32_t paRAMId, const EDMACCPaRAMEntry *newPaRAM)
 Copy the user specified PaRAM Set onto the PaRAM Set associated with the logical channel (QDMA only). More...
 
void EDMA_qdmaSetPaRAMEntry (uint32_t baseAddr, uint32_t paRAMId, uint32_t paRAMEntry, uint32_t newPaRAMEntryVal)
 Set a particular PaRAM set entry of the specified PaRAM set. More...
 
uint32_t EDMA_qdmaGetPaRAMEntry (uint32_t baseAddr, uint32_t paRAMId, uint32_t paRAMEntry)
 Get a particular PaRAM entry of the specified PaRAM set. More...
 
void EDMA_dmaSetPaRAMEntry (uint32_t baseAddr, uint32_t paRAMId, uint32_t paRAMEntry, uint32_t newPaRAMEntryVal)
 Set a particular PaRAM set entry of the specified PaRAM set. More...
 
uint32_t EDMA_dmaGetPaRAMEntry (uint32_t baseAddr, uint32_t paRAMId, uint32_t paRAMEntry)
 Get a particular PaRAM entry of the specified PaRAM set. More...
 
uint32_t EDMA_configureChannelRegion (uint32_t baseAddr, uint32_t regionId, uint32_t chType, uint32_t chNum, uint32_t tccNum, uint32_t paramId, uint32_t evtQNum)
 Request a DMA/QDMA/Link channel. More...
 
uint32_t EDMA_freeChannelRegion (uint32_t baseAddr, uint32_t regionId, uint32_t chType, uint32_t chNum, uint32_t trigMode, uint32_t tccNum, uint32_t evtQNum)
 Free the specified channel (DMA/QDMA/Link) and its associated resources (PaRAM Set, TCC etc) and removes various mappings. More...
 
uint32_t EDMA_enableTransferRegion (uint32_t baseAddr, uint32_t regionId, uint32_t chNum, uint32_t trigMode)
 Start EDMA transfer on the specified channel. More...
 
uint32_t EDMA_disableTransferRegion (uint32_t baseAddr, uint32_t regionId, uint32_t chNum, uint32_t trigMode)
 Disable DMA transfer on the specified channel. More...
 
void EDMA_clearErrorBitsRegion (uint32_t baseAddr, uint32_t regionId, uint32_t chNum, uint32_t evtQNum)
 Clears Event Register and Error Register for a specific DMA channel and brings back EDMA to its initial state. More...
 
uint32_t EDMA_getCCErrStatus (uint32_t baseAddr)
 This returns EDMA CC error status. More...
 
uint32_t EDMA_getErrIntrStatus (uint32_t baseAddr)
 This returns error interrupt status for those events whose event number is less than 32. More...
 
uint32_t EDMA_qdmaGetErrIntrStatus (uint32_t baseAddr)
 This returns QDMA error interrupt status. More...
 
uint32_t EDMA_peripheralIdGet (uint32_t baseAddr)
 This API return the revision Id of the peripheral. More...
 
uint32_t EDMA_intrStatusHighGetRegion (uint32_t baseAddr, uint32_t regionId)
 This function returns interrupt status of those events which are greater than 32. More...
 
uint32_t EDMA_readIntrStatusRegion (uint32_t baseAddr, uint32_t regionId, uint32_t tccNum)
 This function reads interrupt status. More...
 
uint32_t EDMA_getEventStatus (uint32_t baseAddr)
 This function returns status of those events which are less than 32. More...
 
uint32_t EDMA_getEventStatusHigh (uint32_t baseAddr)
 This function returns status of those events which are greater than 32. More...
 
uint32_t EDMA_readEventStatusRegion (uint32_t baseAddr, uint32_t chNum)
 This function reads Event pending status. More...
 
uint32_t EDMA_errIntrHighStatusGet (uint32_t baseAddr)
 This returns error interrupt status for those events whose event number is greater than 32. More...
 
void EDMA_chainChannel (uint32_t baseAddr, uint32_t paRAMId1, uint32_t chId2, uint32_t chainOptions)
 Chain the two specified channels. More...
 
void EDMA_linkChannel (uint32_t baseAddr, uint32_t paRAMId1, uint32_t paRAMId2)
 Link two channels. More...
 
void EDMA_init (void)
 This function initializes the EDMA driver object and controller. More...
 
void EDMA_deinit (void)
 This function Deinitializes the EDMA driver object and controller. More...
 
uint32_t EDMA_isInitialized (EDMA_Handle handle)
 Function to check if EDMA is enabled or not. More...
 
EDMA_Handle EDMA_open (uint32_t index, const EDMA_Params *prms)
 This function opens a given EDMA instance. More...
 
EDMA_Handle EDMA_getHandle (uint32_t index)
 This function returns the handle of an open EDMA Instance from the instance index. More...
 
void EDMA_close (EDMA_Handle handle)
 Function to close a EDMA peripheral specified by the EDMA handle. More...
 
uint32_t EDMA_isInterruptEnabled (EDMA_Handle handle)
 Function to check if EDMA interrupt is enabled. More...
 
int32_t EDMA_registerIntr (EDMA_Handle handle, Edma_IntrObject *intrObj)
 Function to register callback function for a TCC. More...
 
int32_t EDMA_unregisterIntr (EDMA_Handle handle, Edma_IntrObject *intrObj)
 Function to unregister callback function for a TCC. More...
 
uint32_t EDMA_getBaseAddr (EDMA_Handle handle)
 Function to get the edma base address. More...
 
uint32_t EDMA_getRegionId (EDMA_Handle handle)
 Function to get the edma region. More...
 
int32_t EDMA_allocDmaChannel (EDMA_Handle handle, uint32_t *dmaCh)
 Function to allocate the Dma Channel. More...
 
int32_t EDMA_allocQdmaChannel (EDMA_Handle handle, uint32_t *qdmaCh)
 Function to allocate the Dma Channel. More...
 
int32_t EDMA_allocTcc (EDMA_Handle handle, uint32_t *tcc)
 Function to allocate the Qdma Channel. More...
 
int32_t EDMA_allocParam (EDMA_Handle handle, uint32_t *param)
 Function to allocate the TCC. More...
 
int32_t EDMA_freeDmaChannel (EDMA_Handle handle, uint32_t *dmaCh)
 Function to free the Dma Channel. More...
 
int32_t EDMA_freeQdmaChannel (EDMA_Handle handle, uint32_t *qdmaCh)
 Function to free the Qdma Channel. More...
 
int32_t EDMA_freeTcc (EDMA_Handle handle, uint32_t *tcc)
 Function to free the tcc Channel. More...
 
int32_t EDMA_freeParam (EDMA_Handle handle, uint32_t *param)
 Function to free the Param. More...
 

Typedefs

typedef struct Edma_IntrObject_t * Edma_IntrHandle
 EDMA interrupt handle returned from EDMA_registerIntr() function. More...
 
typedef void(* Edma_EventCallback) (Edma_IntrHandle intrHandle, void *appData)
 EDMA interrupt callback function prototype. More...
 
typedef void * EDMA_Handle
 A handle that is returned from a EDMA_open() call. More...
 

Macros

#define EDMA_SET_ALL_BITS   ((uint32_t) 0xFFFFFFFFU)
 
#define EDMA_CLR_ALL_BITS   ((uint32_t) 0x00000000U)
 
#define EDMACC_COMPL_HANDLER_RETRY_COUNT   ((uint32_t) 10U)
 
#define EDMACC_ERR_HANDLER_RETRY_COUNT   ((uint32_t) 10U)
 

EDMA Queue Number Configuration.

#define EDMACC_DMAQNUM_CLR(chNum)    (~((uint32_t) 0x7U << (((chNum) % 8U) * 4U)))
 
#define EDMACC_DMAQNUM_SET(chNum, queNum)    (((uint32_t) 0x7U & (queNum)) << (((chNum) % 8U) * 4U))
 
#define EDMACC_QDMAQNUM_CLR(chNum)    (~((uint32_t) 0x7U << ((chNum) * 4U)))
 
#define EDMACC_QDMAQNUM_SET(chNum, queNum)    (((uint32_t) 0x7U & (queNum)) << ((chNum) * 4U))
 

EDMA Qdma Channel mapping Configuration.

#define EDMACC_QCHMAP_PAENTRY_CLR   ((uint32_t) (~((uint32_t)EDMA_TPCC_QCHMAPN_PAENTRY_MASK)))
 
#define EDMACC_QCHMAP_PAENTRY_SET(paRAMId)
 
#define EDMACC_QCHMAP_TRWORD_CLR   ((uint32_t) (~((uint32_t)EDMA_TPCC_QCHMAPN_TRWORD_MASK)))
 
#define EDMACC_QCHMAP_TRWORD_SET(paRAMId)
 

EDMA PaRAM BIDX configuration helper macros.

#define EDMA_PARAM_BIDX(val)   (val & 0xFFFF)
 
#define EDMA_PARAM_BIDX_EXT(val)   ((val & 0xFF0000) >> 16)
 

EDMA Trigger Mode Configuration.

#define EDMA_TRIG_MODE_MANUAL   ((uint32_t) 0U)
 
#define EDMA_TRIG_MODE_QDMA   ((uint32_t) 1U)
 
#define EDMA_TRIG_MODE_EVENT   ((uint32_t) 2U)
 

EDMA channel type definitions.

#define EDMA_CHANNEL_TYPE_DMA   ((uint32_t) 0U)
 Values that can be used for parameter chType in API's. More...
 
#define EDMA_CHANNEL_TYPE_QDMA   ((uint32_t) 1U)
 

EDMA event status definitions.

#define EDMA_XFER_COMPLETE   ((uint32_t) 0U)
 Values that can be used to specify different event status. More...
 
#define EDMA_CC_DMA_EVT_MISS   ((uint32_t) 1U)
 
#define EDMA_CC_QDMA_EVT_MISS   ((uint32_t) 2U)
 

EDMA transfer type definitions.

#define EDMA_SYNC_A   ((uint32_t) 0U)
 Values that can be used to specify different synchronization events. More...
 
#define EDMA_SYNC_AB   ((uint32_t) 1U)
 

EDMA addressing modes definitions.

AB Sync Transfer

#define EDMA_ADDRESSING_MODE_LINEAR   ((uint32_t) 0U)
 Values that can be used to specify different addressing modes (relevant for SAM and DAM sub-fields in OPT field). More...
 
#define EDMA_ADDRESSING_MODE_FIFO_WRAP   ((uint32_t) 1U)
 

EDMA FIFO width definitions.

#define EDMA_FIFO_WIDTH_8BIT   ((uint32_t) EDMA_TPCC_OPT_FWID_FIFOWIDTH8BIT)
 Values that can be used to specify different FIFO widths (FWID in OPT field). More...
 
#define EDMA_FIFO_WIDTH_16BIT   ((uint32_t) EDMA_TPCC_OPT_FWID_FIFOWIDTH16BIT)
 
#define EDMA_FIFO_WIDTH_32BIT   ((uint32_t) EDMA_TPCC_OPT_FWID_FIFOWIDTH32BIT)
 
#define EDMA_FIFO_WIDTH_64BIT   ((uint32_t) EDMA_TPCC_OPT_FWID_FIFOWIDTH64BIT)
 
#define EDMA_FIFO_WIDTH_128BIT   ((uint32_t) EDMA_TPCC_OPT_FWID_FIFOWIDTH128BIT)
 
#define EDMA_FIFO_WIDTH_256BIT   ((uint32_t) DMA_TPCC_OPT_FWID_FIFOWIDTH256BIT)
 

EDMA Clear Channel controller Error.

#define EDMACC_CLR_TCCERR   ((uint32_t) EDMA_TPCC_CCERRCLR_TCERR_MASK)
 Values that can be used to Clear any Channel controller Errors. More...
 
#define EDMACC_CLR_QTHRQ0   ((uint32_t) EDMA_TPCC_CCERRCLR_QTHRXCD0_MASK)
 
#define EDMACC_CLR_QTHRQ1   ((uint32_t) EDMA_TPCC_CCERRCLR_QTHRXCD1_MASK)
 

EDMA Param OPT fields.

#define EDMA_OPT_TCCHEN_MASK   ((uint32_t) EDMA_TPCC_OPT_TCCHEN_MASK)
 Values that are used to Chain two specified channels. More...
 
#define EDMA_OPT_ITCCHEN_MASK   ((uint32_t) EDMA_TPCC_OPT_ITCCHEN_MASK)
 
#define EDMA_OPT_TCINTEN_MASK   ((uint32_t) EDMA_TPCC_OPT_TCINTEN_MASK)
 
#define EDMA_OPT_ITCINTEN_MASK   ((uint32_t) EDMA_TPCC_OPT_ITCINTEN_MASK)
 
#define EDMA_OPT_TCC_MASK   ((uint32_t) EDMA_TPCC_OPT_TCC_MASK)
 
#define EDMA_OPT_TCC_SHIFT   ((uint32_t) EDMA_TPCC_OPT_TCC_SHIFT)
 
#define EDMA_OPT_SYNCDIM_MASK   ((uint32_t) EDMA_TPCC_OPT_SYNCDIM_MASK)
 
#define EDMA_OPT_SYNCDIM_SHIFT   ((uint32_t) EDMA_TPCC_OPT_SYNCDIM_SHIFT)
 
#define EDMA_OPT_STATIC_MASK   ((uint32_t) EDMA_TPCC_OPT_STATIC_MASK)
 
#define EDMA_OPT_STATIC_SHIFT   ((uint32_t) EDMA_TPCC_OPT_STATIC_SHIFT)
 
#define EDMACC_OPT_TCC_CLR   ((uint32_t) (~EDMA_TPCC_OPT_TCC_MASK))
 
#define EDMACC_OPT_TCC_SET(tcc)
 
#define EDMA_OPT_SAM_MASK   ((uint32_t) EDMA_TPCC_OPT_SAM_MASK)
 
#define EDMA_OPT_SAM_SHIFT   ((uint32_t) EDMA_TPCC_OPT_SAM_SHIFT)
 
#define EDMA_OPT_DAM_MASK   ((uint32_t) EDMA_TPCC_OPT_DAM_SHIFT)
 
#define EDMA_OPT_DAM_SHIFT   ((uint32_t) EDMA_TPCC_OPT_DAM_SHIFT)
 

EDMA Param fields.

#define EDMACC_PARAM_ENTRY_OPT   ((uint32_t) 0x0U)
 PaRAMEntry Fields. More...
 
#define EDMACC_PARAM_ENTRY_SRC   ((uint32_t) 0x1U)
 
#define EDMACC_PARAM_ENTRY_ACNT_BCNT   ((uint32_t) 0x2U)
 
#define EDMACC_PARAM_ENTRY_DST   ((uint32_t) 0x3U)
 
#define EDMACC_PARAM_ENTRY_SRC_DST_BIDX   ((uint32_t) 0x4U)
 
#define EDMACC_PARAM_ENTRY_LINK_BCNTRLD   ((uint32_t) 0x5U)
 
#define EDMACC_PARAM_ENTRY_SRC_DST_CIDX   ((uint32_t) 0x6U)
 
#define EDMACC_PARAM_ENTRY_CCNT   ((uint32_t) 0x7U)
 
#define EDMACC_PARAM_FIELD_OFFSET   ((uint32_t) 0x4U)
 
#define EDMACC_PARAM_ENTRY_FIELDS   ((uint32_t) 0x8U)
 
#define EDMA_NUM_TCC   ((uint32_t) SOC_EDMA_NUM_DMACH)
 

EDMA resource type definition used for resource allocation and freeing.

#define EDMA_RESOURCE_TYPE_DMA   ((uint32_t) 0U)
 Values that can be used for parameter resType in API's. More...
 
#define EDMA_RESOURCE_TYPE_QDMA   ((uint32_t) 1U)
 
#define EDMA_RESOURCE_TYPE_TCC   ((uint32_t) 2U)
 
#define EDMA_RESOURCE_TYPE_PARAM   ((uint32_t) 3U)
 
#define EDMA_RESOURCE_ALLOC_ANY   ((uint32_t) 0xFFFFU)
 

Macro Definition Documentation

◆ EDMACC_DMAQNUM_CLR

#define EDMACC_DMAQNUM_CLR (   chNum)     (~((uint32_t) 0x7U << (((chNum) % 8U) * 4U)))

DMAQNUM bits Clear

◆ EDMACC_DMAQNUM_SET

#define EDMACC_DMAQNUM_SET (   chNum,
  queNum 
)     (((uint32_t) 0x7U & (queNum)) << (((chNum) % 8U) * 4U))

DMAQNUM bits Set

◆ EDMACC_QDMAQNUM_CLR

#define EDMACC_QDMAQNUM_CLR (   chNum)     (~((uint32_t) 0x7U << ((chNum) * 4U)))

QDMAQNUM bits Clear

◆ EDMACC_QDMAQNUM_SET

#define EDMACC_QDMAQNUM_SET (   chNum,
  queNum 
)     (((uint32_t) 0x7U & (queNum)) << ((chNum) * 4U))

QDMAQNUM bits Set

◆ EDMACC_QCHMAP_PAENTRY_CLR

#define EDMACC_QCHMAP_PAENTRY_CLR   ((uint32_t) (~((uint32_t)EDMA_TPCC_QCHMAPN_PAENTRY_MASK)))

QCHMAP Param ID Clear

◆ EDMACC_QCHMAP_PAENTRY_SET

#define EDMACC_QCHMAP_PAENTRY_SET (   paRAMId)
Value:
(((EDMA_TPCC_QCHMAPN_PAENTRY_MASK >> EDMA_TPCC_QCHMAPN_PAENTRY_SHIFT) \
& (paRAMId)) << EDMA_TPCC_QCHMAPN_PAENTRY_SHIFT) \

QCHMAP-PaRAMEntry bitfield Set

◆ EDMACC_QCHMAP_TRWORD_CLR

#define EDMACC_QCHMAP_TRWORD_CLR   ((uint32_t) (~((uint32_t)EDMA_TPCC_QCHMAPN_TRWORD_MASK)))

QCHMAP-TrigWord bitfield Clear

◆ EDMACC_QCHMAP_TRWORD_SET

#define EDMACC_QCHMAP_TRWORD_SET (   paRAMId)
Value:
(((EDMA_TPCC_QCHMAPN_TRWORD_MASK >> EDMA_TPCC_QCHMAPN_TRWORD_SHIFT) & \
(paRAMId)) << EDMA_TPCC_QCHMAPN_TRWORD_SHIFT)

QCHMAP-TrigWord bitfield Set

◆ EDMA_PARAM_BIDX

#define EDMA_PARAM_BIDX (   val)    (val & 0xFFFF)

Macro to derive BIDX Lower bits to be programmed in srcBIdx and dstBIdx

◆ EDMA_PARAM_BIDX_EXT

#define EDMA_PARAM_BIDX_EXT (   val)    ((val & 0xFF0000) >> 16)

Macro to derive BIDX Higher bits to be programmed in srcBIdxExt and dstBIdxExt

◆ EDMA_TRIG_MODE_MANUAL

#define EDMA_TRIG_MODE_MANUAL   ((uint32_t) 0U)

Manually trigger EDMA transfer

◆ EDMA_TRIG_MODE_QDMA

#define EDMA_TRIG_MODE_QDMA   ((uint32_t) 1U)

Manually trigger QDMA transfer

◆ EDMA_TRIG_MODE_EVENT

#define EDMA_TRIG_MODE_EVENT   ((uint32_t) 2U)

Trigger EDMA transfer upon Event

◆ EDMA_CHANNEL_TYPE_DMA

#define EDMA_CHANNEL_TYPE_DMA   ((uint32_t) 0U)

Values that can be used for parameter chType in API's.

Channel Typr DMA

◆ EDMA_CHANNEL_TYPE_QDMA

#define EDMA_CHANNEL_TYPE_QDMA   ((uint32_t) 1U)

Channel Typr QDMA

◆ EDMA_XFER_COMPLETE

#define EDMA_XFER_COMPLETE   ((uint32_t) 0U)

Values that can be used to specify different event status.

Transfer Complete

◆ EDMA_CC_DMA_EVT_MISS

#define EDMA_CC_DMA_EVT_MISS   ((uint32_t) 1U)

DMA Event Miss

◆ EDMA_CC_QDMA_EVT_MISS

#define EDMA_CC_QDMA_EVT_MISS   ((uint32_t) 2U)

QDMA Event Miss

◆ EDMA_SYNC_A

#define EDMA_SYNC_A   ((uint32_t) 0U)

Values that can be used to specify different synchronization events.

A Sync Transfer

◆ EDMA_SYNC_AB

#define EDMA_SYNC_AB   ((uint32_t) 1U)

◆ EDMA_ADDRESSING_MODE_LINEAR

#define EDMA_ADDRESSING_MODE_LINEAR   ((uint32_t) 0U)

Values that can be used to specify different addressing modes (relevant for SAM and DAM sub-fields in OPT field).

Incremental addressing (INCR), not FIFO

◆ EDMA_ADDRESSING_MODE_FIFO_WRAP

#define EDMA_ADDRESSING_MODE_FIFO_WRAP   ((uint32_t) 1U)

Constant addressing (CONST) within the FIFO array, wraps around upon reaching FIFO width

◆ EDMA_FIFO_WIDTH_8BIT

#define EDMA_FIFO_WIDTH_8BIT   ((uint32_t) EDMA_TPCC_OPT_FWID_FIFOWIDTH8BIT)

Values that can be used to specify different FIFO widths (FWID in OPT field).

8-bit FIFO width

◆ EDMA_FIFO_WIDTH_16BIT

#define EDMA_FIFO_WIDTH_16BIT   ((uint32_t) EDMA_TPCC_OPT_FWID_FIFOWIDTH16BIT)

16-bit FIFO width

◆ EDMA_FIFO_WIDTH_32BIT

#define EDMA_FIFO_WIDTH_32BIT   ((uint32_t) EDMA_TPCC_OPT_FWID_FIFOWIDTH32BIT)

32-bit FIFO width

◆ EDMA_FIFO_WIDTH_64BIT

#define EDMA_FIFO_WIDTH_64BIT   ((uint32_t) EDMA_TPCC_OPT_FWID_FIFOWIDTH64BIT)

64-bit FIFO width

◆ EDMA_FIFO_WIDTH_128BIT

#define EDMA_FIFO_WIDTH_128BIT   ((uint32_t) EDMA_TPCC_OPT_FWID_FIFOWIDTH128BIT)

128-bit FIFO width

◆ EDMA_FIFO_WIDTH_256BIT

#define EDMA_FIFO_WIDTH_256BIT   ((uint32_t) DMA_TPCC_OPT_FWID_FIFOWIDTH256BIT)

256-bit FIFO width

◆ EDMACC_CLR_TCCERR

#define EDMACC_CLR_TCCERR   ((uint32_t) EDMA_TPCC_CCERRCLR_TCERR_MASK)

Values that can be used to Clear any Channel controller Errors.

Cleat TCC Error

◆ EDMACC_CLR_QTHRQ0

#define EDMACC_CLR_QTHRQ0   ((uint32_t) EDMA_TPCC_CCERRCLR_QTHRXCD0_MASK)

Cleat Queue threshold 0 Error

◆ EDMACC_CLR_QTHRQ1

#define EDMACC_CLR_QTHRQ1   ((uint32_t) EDMA_TPCC_CCERRCLR_QTHRXCD1_MASK)

Cleat Queue threshold 1 Error

◆ EDMA_OPT_TCCHEN_MASK

#define EDMA_OPT_TCCHEN_MASK   ((uint32_t) EDMA_TPCC_OPT_TCCHEN_MASK)

Values that are used to Chain two specified channels.

Transfer Complete Chaining enable

◆ EDMA_OPT_ITCCHEN_MASK

#define EDMA_OPT_ITCCHEN_MASK   ((uint32_t) EDMA_TPCC_OPT_ITCCHEN_MASK)

Intermediate Transfer Complete Chaining enable

◆ EDMA_OPT_TCINTEN_MASK

#define EDMA_OPT_TCINTEN_MASK   ((uint32_t) EDMA_TPCC_OPT_TCINTEN_MASK)

Transfer Complete Interrupt enable

◆ EDMA_OPT_ITCINTEN_MASK

#define EDMA_OPT_ITCINTEN_MASK   ((uint32_t) EDMA_TPCC_OPT_ITCINTEN_MASK)

Intermediate Transfer Complete Interrupt enable

◆ EDMA_OPT_TCC_MASK

#define EDMA_OPT_TCC_MASK   ((uint32_t) EDMA_TPCC_OPT_TCC_MASK)

Transfer Complete Code mask

◆ EDMA_OPT_TCC_SHIFT

#define EDMA_OPT_TCC_SHIFT   ((uint32_t) EDMA_TPCC_OPT_TCC_SHIFT)

Transfer Complete Code shift

◆ EDMA_OPT_SYNCDIM_MASK

#define EDMA_OPT_SYNCDIM_MASK   ((uint32_t) EDMA_TPCC_OPT_SYNCDIM_MASK)

Sync Type shift

◆ EDMA_OPT_SYNCDIM_SHIFT

#define EDMA_OPT_SYNCDIM_SHIFT   ((uint32_t) EDMA_TPCC_OPT_SYNCDIM_SHIFT)

Sync Type mask

◆ EDMA_OPT_STATIC_MASK

#define EDMA_OPT_STATIC_MASK   ((uint32_t) EDMA_TPCC_OPT_STATIC_MASK)

Param Static mask

◆ EDMA_OPT_STATIC_SHIFT

#define EDMA_OPT_STATIC_SHIFT   ((uint32_t) EDMA_TPCC_OPT_STATIC_SHIFT)

Param Static mask

◆ EDMACC_OPT_TCC_CLR

#define EDMACC_OPT_TCC_CLR   ((uint32_t) (~EDMA_TPCC_OPT_TCC_MASK))

OPT-TCC bitfield Clear

◆ EDMACC_OPT_TCC_SET

#define EDMACC_OPT_TCC_SET (   tcc)
Value:
(((EDMA_TPCC_OPT_TCC_MASK >> EDMA_TPCC_OPT_TCC_SHIFT) & (tcc)) << \
EDMA_TPCC_OPT_TCC_SHIFT)

OPT-TCC bitfield Set

◆ EDMA_OPT_SAM_MASK

#define EDMA_OPT_SAM_MASK   ((uint32_t) EDMA_TPCC_OPT_SAM_MASK)

Source Addressing Mode mask

◆ EDMA_OPT_SAM_SHIFT

#define EDMA_OPT_SAM_SHIFT   ((uint32_t) EDMA_TPCC_OPT_SAM_SHIFT)

Source Addressing Mode shift

◆ EDMA_OPT_DAM_MASK

#define EDMA_OPT_DAM_MASK   ((uint32_t) EDMA_TPCC_OPT_DAM_SHIFT)

Destination Addressing Mode mask

◆ EDMA_OPT_DAM_SHIFT

#define EDMA_OPT_DAM_SHIFT   ((uint32_t) EDMA_TPCC_OPT_DAM_SHIFT)

Destination Addressing Mode shift

◆ EDMACC_PARAM_ENTRY_OPT

#define EDMACC_PARAM_ENTRY_OPT   ((uint32_t) 0x0U)

PaRAMEntry Fields.

The OPT field (Offset Address 0x0 Bytes)

◆ EDMACC_PARAM_ENTRY_SRC

#define EDMACC_PARAM_ENTRY_SRC   ((uint32_t) 0x1U)

The SRC field (Offset Address 0x4 Bytes)

◆ EDMACC_PARAM_ENTRY_ACNT_BCNT

#define EDMACC_PARAM_ENTRY_ACNT_BCNT   ((uint32_t) 0x2U)

The (ACNT+BCNT) field (Offset Address 0x8 Bytes)

◆ EDMACC_PARAM_ENTRY_DST

#define EDMACC_PARAM_ENTRY_DST   ((uint32_t) 0x3U)

The DST field (Offset Address 0xC Bytes)

◆ EDMACC_PARAM_ENTRY_SRC_DST_BIDX

#define EDMACC_PARAM_ENTRY_SRC_DST_BIDX   ((uint32_t) 0x4U)

The (SRCBIDX+DSTBIDX) field (Offset Address 0x10 Bytes)

◆ EDMACC_PARAM_ENTRY_LINK_BCNTRLD

#define EDMACC_PARAM_ENTRY_LINK_BCNTRLD   ((uint32_t) 0x5U)

The (LINK+BCNTRLD) field (Offset Address 0x14 Bytes)

◆ EDMACC_PARAM_ENTRY_SRC_DST_CIDX

#define EDMACC_PARAM_ENTRY_SRC_DST_CIDX   ((uint32_t) 0x6U)

The (SRCCIDX+DSTCIDX) field (Offset Address 0x18 Bytes)

◆ EDMACC_PARAM_ENTRY_CCNT

#define EDMACC_PARAM_ENTRY_CCNT   ((uint32_t) 0x7U)

The (CCNT+RSVD) field (Offset Address 0x1C Bytes)

◆ EDMACC_PARAM_FIELD_OFFSET

#define EDMACC_PARAM_FIELD_OFFSET   ((uint32_t) 0x4U)

The offset for each PaRAM Entry field

◆ EDMACC_PARAM_ENTRY_FIELDS

#define EDMACC_PARAM_ENTRY_FIELDS   ((uint32_t) 0x8U)

Number of PaRAM Entry fields. OPT, SRC, A_B_CNT, DST, SRC_DST_BIDX, LINK_BCNTRLD, SRC_DST_CIDX and CCNT

◆ EDMA_NUM_TCC

#define EDMA_NUM_TCC   ((uint32_t) SOC_EDMA_NUM_DMACH)

Number of TCC's available

◆ EDMA_RESOURCE_TYPE_DMA

#define EDMA_RESOURCE_TYPE_DMA   ((uint32_t) 0U)

Values that can be used for parameter resType in API's.

Resource Type DMA

◆ EDMA_RESOURCE_TYPE_QDMA

#define EDMA_RESOURCE_TYPE_QDMA   ((uint32_t) 1U)

Resource Type QDMA

◆ EDMA_RESOURCE_TYPE_TCC

#define EDMA_RESOURCE_TYPE_TCC   ((uint32_t) 2U)

Resource Type TCC

◆ EDMA_RESOURCE_TYPE_PARAM

#define EDMA_RESOURCE_TYPE_PARAM   ((uint32_t) 3U)

Resource Type PARAM

◆ EDMA_RESOURCE_ALLOC_ANY

#define EDMA_RESOURCE_ALLOC_ANY   ((uint32_t) 0xFFFFU)

Allocate any available resource

◆ EDMA_SET_ALL_BITS

#define EDMA_SET_ALL_BITS   ((uint32_t) 0xFFFFFFFFU)

Used to set all Bits in a register

◆ EDMA_CLR_ALL_BITS

#define EDMA_CLR_ALL_BITS   ((uint32_t) 0x00000000U)

Used to clear all Bits in a register

◆ EDMACC_COMPL_HANDLER_RETRY_COUNT

#define EDMACC_COMPL_HANDLER_RETRY_COUNT   ((uint32_t) 10U)

Completion interrupt handler retry count

◆ EDMACC_ERR_HANDLER_RETRY_COUNT

#define EDMACC_ERR_HANDLER_RETRY_COUNT   ((uint32_t) 10U)

Error interrupt handler retry count

Typedef Documentation

◆ Edma_IntrHandle

typedef struct Edma_IntrObject_t* Edma_IntrHandle

EDMA interrupt handle returned from EDMA_registerIntr() function.

◆ Edma_EventCallback

typedef void(* Edma_EventCallback) (Edma_IntrHandle intrHandle, void *appData)

EDMA interrupt callback function prototype.

◆ EDMA_Handle

typedef void* EDMA_Handle

A handle that is returned from a EDMA_open() call.

Function Documentation

◆ EDMA_initParamsInit()

void EDMA_initParamsInit ( EDMA_InitParams initParam)

Structure initialization function for EDMA_InitParams.

Parameters
initParamSets default initialization parameter used by API EDMAInitialize. This will set all DMA, QDMA, PaRAMs as own channels. Application should override this with appropriate owned resources. Overriding is must when EDMA is shared by multiple cores.

◆ EDMA_ccPaRAMEntry_init()

void EDMA_ccPaRAMEntry_init ( EDMACCPaRAMEntry *  paramEntry)

Clear a PaRAM Set .

Parameters
paramEntryParameter RAM set to be cleared.

◆ EDMA_enableChInShadowRegRegion()

void EDMA_enableChInShadowRegRegion ( uint32_t  baseAddr,
uint32_t  regionId,
uint32_t  chType,
uint32_t  chNum 
)

Enable channel to Shadow region mapping.

This API allocates DMA/QDMA channels or TCCs, and the same resources are enabled in the shadow region specific register (DRAE/DRAEH/QRAE). Here only one shadow region is used since, there is only one Master.

Parameters
baseAddrMemory address of the EDMA instance used.
regionIdRegion id to be used. Valid values are 0 to SOC_EDMA_NUM_REGIONS-1
chType(DMA/QDMA) Channel For Example: For DMA it is, EDMA_CHANNEL_TYPE_DMA.
chNumAllocated channel number. Valid values are 0 to SOC_EDMA_NUM_DMACH-1 for DMA Valid values are 0 to SOC_EDMA_NUM_QDMACH-1 for QDMA
chType can have values EDMA_CHANNEL_TYPE_DMA
EDMA_CHANNEL_TYPE_QDMA

◆ EDMA_disableChInShadowRegRegion()

void EDMA_disableChInShadowRegRegion ( uint32_t  baseAddr,
uint32_t  regionId,
uint32_t  chType,
uint32_t  chNum 
)

Disable channel to Shadow region mapping.

This API deallocates DMA/QDMA channels or TCCs, and the same resources are disabled in the shadow region specific register (DRAE/DRAEH/QRAE). Here only one shadow region is used since, there is only one Master.

Parameters
baseAddrMemory address of the EDMA instance used.
regionIdRegion id to be used. Valid values are 0 to SOC_EDMA_NUM_REGIONS-1
chType(DMA/QDMA) Channel
chNumAllocated channel number. Valid values are 0 to SOC_EDMA_NUM_DMACH-1 for DMA Valid values are 0 to SOC_EDMA_NUM_QDMACH-1 for QDMA

chType can have values EDMA_CHANNEL_TYPE_DMA
EDMA_CHANNEL_TYPE_QDMA

◆ EDMA_channelToParamMap()

void EDMA_channelToParamMap ( uint32_t  baseAddr,
uint32_t  channel,
uint32_t  paramSet 
)

This function maps DMA channel to any of the PaRAM sets in the PaRAM memory map.

Parameters
baseAddrMemory address of the EDMA instance used.
channelThe DMA channel number required to be mapped.
paramSetIt specifies the paramSet to which DMA channel required to be mapped. Valid values are 0 to SOC_EDMA_NUM_PARAMSETS-1

◆ EDMA_mapChToEvtQ()

void EDMA_mapChToEvtQ ( uint32_t  baseAddr,
uint32_t  chType,
uint32_t  chNum,
uint32_t  evtQNum 
)

Map channel to Event Queue.

This API maps DMA/QDMA channels to the Event Queue

Parameters
baseAddrMemory address of the EDMA instance used.
chType(DMA/QDMA) Channel For Example: For QDMA it is EDMA_CHANNEL_TYPE_QDMA.
chNumAllocated channel number. Valid values are 0 to SOC_EDMA_NUM_DMACH-1 for DMA Valid values are 0 to SOC_EDMA_NUM_QDMACH-1 for QDMA
evtQNumEvent Queue Number to which the channel will be mapped (valid only for the Master Channel (DMA/QDMA) request).
chtype can have values EDMA_CHANNEL_TYPE_DMA
EDMA_CHANNEL_TYPE_QDMA

◆ EDMA_unmapChToEvtQ()

void EDMA_unmapChToEvtQ ( uint32_t  baseAddr,
uint32_t  chType,
uint32_t  chNum 
)

Remove Mapping of channel to Event Queue.

This API Unmaps DMA/QDMA channels from the Event Queue allocated

Parameters
baseAddrMemory address of the EDMA instance used.
chType(DMA/QDMA) Channel For Example: For DMA it is EDMA_CHANNEL_TYPE_DMA.
chNumAllocated channel number. Valid values are 0 to SOC_EDMA_NUM_DMACH-1 for DMA Valid values are 0 to SOC_EDMA_NUM_QDMACH-1 for QDMA
chtype can have values EDMA_CHANNEL_TYPE_DMA
EDMA_CHANNEL_TYPE_QDMA

◆ EDMA_mapQdmaChToPaRAM()

void EDMA_mapQdmaChToPaRAM ( uint32_t  baseAddr,
uint32_t  chNum,
const uint32_t *  paRAMId 
)

Enables the user to map a QDMA channel to PaRAM set This API Needs to be called before programming the paRAM sets for the QDMA Channels.Application needs to maitain the paRAMId provided by this API.This paRAMId is used to set paRAM and get paRAM. Refer corresponding API's for more details.

Parameters
baseAddrMemory address of the EDMA instance used.
chNumAllocated channel number. Valid values are 0 to SOC_EDMA_NUM_QDMACH-1 for QDMA
paRAMIdPaRAM Id to which the QDMA channel will be mapped to. mapped to.

Note : The PaRAMId requested must be greater than 32(SOC_EDMA_NUM_DMACH). and lesser than SOC_EDMA_NUM_DMACH + chNum Because, the first 32 PaRAM's are directly mapped to first 32 DMA channels and (32 - 38) for QDMA Channels. (32 - 38) is assigned by driver in this API.

◆ EDMA_getMappedPaRAM()

uint32_t EDMA_getMappedPaRAM ( uint32_t  baseAddr,
uint32_t  chNum,
uint32_t  chType,
uint32_t *  paramId 
)

Returns the PaRAM associated with the DMA/QDMA channel.

Parameters
baseAddrMemory address of the EDMA instance used.
chNumAllocated channel number. Valid values are 0 to SOC_EDMA_NUM_DMACH-1 for DMA Valid values are 0 to SOC_EDMA_NUM_QDMACH-1 for QDMA
chType(DMA/QDMA) Channel For Example: For QDMA it is, EDMA_CHANNEL_TYPE_QDMA.
paramIdAssociated paramId is returned in this pointer.
Returns
TRUE if parameters are valid else return FALSE.

◆ EDMA_setQdmaTrigWord()

void EDMA_setQdmaTrigWord ( uint32_t  baseAddr,
uint32_t  chNum,
uint32_t  trigWord 
)

Assign a Trigger Word to the specified QDMA channel.

This API sets the Trigger word for the specific QDMA channel in the QCHMAP Register. Default QDMA trigger word is CCNT.

Parameters
baseAddrMemory address of the EDMA instance used.
chNumQDMA Channel which needs to be assigned the Trigger Word. Valid values are 0 to SOC_EDMA_NUM_QDMACH-1 for QDMA
trigWordThe Trigger Word for the QDMA channel. Trigger Word is the word in the PaRAM Register Set which, when written to by CPU, will start the QDMA transfer automatically.

◆ EDMA_clrMissEvtRegion()

void EDMA_clrMissEvtRegion ( uint32_t  baseAddr,
uint32_t  regionId,
uint32_t  chNum 
)

Enables the user to Clear any missed event.

Parameters
baseAddrMemory address of the EDMA instance used.
regionIdRegion id to be used. Valid values are 0 to SOC_EDMA_NUM_REGIONS-1
chNumAllocated channel number.
Valid values are 0 to SOC_EDMA_NUM_DMACH-1 for DMA

◆ EDMA_qdmaClrMissEvtRegion()

void EDMA_qdmaClrMissEvtRegion ( uint32_t  baseAddr,
uint32_t  regionId,
uint32_t  chNum 
)

Enables the user to Clear any QDMA missed event.

Parameters
baseAddrMemory address of the EDMA instance used.
regionIdRegion id to be used. Valid values are 0 to SOC_EDMA_NUM_REGIONS-1
chNumAllocated channel number.
Valid values are 0 to SOC_EDMA_NUM_QDMACH-1 for QDMA

◆ EDMA_clrCCErr()

void EDMA_clrCCErr ( uint32_t  baseAddr,
uint32_t  flags 
)

Enables the user to Clear any Channel controller Errors.

Parameters
baseAddrMemory address of the EDMA instance used.
flagsMasks to be passed.
flags can have values:

EDMACC_CLR_TCCERR Clears the TCCERR bit in the EDMACC ERR Reg
EDMACC_CLR_QTHRQ0 Queue threshold error clear for queue 0.
EDMACC_CLR_QTHRQ1 Queue threshold error clear for queue 1.

◆ EDMA_setEvtRegion()

void EDMA_setEvtRegion ( uint32_t  baseAddr,
uint32_t  regionId,
uint32_t  chNum 
)

Enables the user to Set an event. This API helps user to manually set events to initiate DMA transfer requests.

Parameters
baseAddrMemory address of the EDMA instance used.
regionIdRegion id to be used.
chNumAllocated channel number. Valid values are 0 to SOC_EDMA_NUM_DMACH-1 for DMA

Note : This API is generally used during Manual transfers.

◆ EDMA_clrEvtRegion()

void EDMA_clrEvtRegion ( uint32_t  baseAddr,
uint32_t  regionId,
uint32_t  chNum 
)

Enables the user to Clear an event.

Parameters
baseAddrMemory address of the EDMA instance used.
regionIdRegion id to be used. Valid values are 0 to SOC_EDMA_NUM_REGIONS-1
chNumAllocated channel number.
Valid values are 0 to SOC_EDMA_NUM_DMACH-1 for DMA

Note : This API is generally used during Manual transfers.

◆ EDMA_enableDmaEvtRegion()

void EDMA_enableDmaEvtRegion ( uint32_t  baseAddr,
uint32_t  regionId,
uint32_t  chNum 
)

Enables the user to enable an DMA event.

Parameters
baseAddrMemory address of the EDMA instance used.
regionIdRegion id to be used. Valid values are 0 to SOC_EDMA_NUM_REGIONS-1
chNumAllocated channel number. Valid values are 0 to SOC_EDMA_NUM_DMACH-1 for DMA

Note : Writes of 1 to the bits in EESR sets the corresponding event bits in EER. This is generally used for Event Based transfers.

◆ EDMA_disableDmaEvtRegion()

void EDMA_disableDmaEvtRegion ( uint32_t  baseAddr,
uint32_t  regionId,
uint32_t  chNum 
)

Enables the user to Disable an DMA event.

Parameters
baseAddrMemory address of the EDMA instance used.
regionIdRegion id to be used. Valid values are 0 to SOC_EDMA_NUM_REGIONS-1
chNumAllocated channel number. Valid values are 0 to SOC_EDMA_NUM_DMACH-1 for DMA

Note : Writes of 1 to the bits in EECR clear the corresponding event bits in EER; writes of 0 have no effect.. This is generally used for Event Based transfers.

◆ EDMA_enableQdmaEvtRegion()

void EDMA_enableQdmaEvtRegion ( uint32_t  baseAddr,
uint32_t  regionId,
uint32_t  chNum 
)

Enables the user to enable an QDMA event.

Parameters
baseAddrMemory address of the EDMA instance used.
regionIdRegion id to be used. Valid values are 0 to SOC_EDMA_NUM_REGIONS-1
chNumAllocated channel number. Valid values are 0 to SOC_EDMA_NUM_QDMACH-1 for QDMA

Note : Writes of 1 to the bits in QEESR sets the corresponding event bits in QEER.

◆ EDMA_disableQdmaEvtRegion()

void EDMA_disableQdmaEvtRegion ( uint32_t  baseAddr,
uint32_t  regionId,
uint32_t  chNum 
)

Enables the user to disable an QDMA event.

Parameters
baseAddrMemory address of the EDMA instance used.
regionIdRegion id to be used. Valid values are 0 to SOC_EDMA_NUM_REGIONS-1
chNumAllocated channel number. Valid values are 0 to SOC_EDMA_NUM_QDMACH-1 for QDMA

Note : Writes of 1 to the bits in QEECR clears the corresponding event bits in QEER.

◆ EDMA_getIntrStatusRegion()

uint32_t EDMA_getIntrStatusRegion ( uint32_t  baseAddr,
uint32_t  regionId 
)

This function returns interrupts status of those events which is less than 32.

Parameters
baseAddrMemory address of the EDMA instance used.
regionIdRegion id to be used. Valid values are 0 to SOC_EDMA_NUM_REGIONS-1
Returns
Interrupt status register value

◆ EDMA_enableEvtIntrRegion()

void EDMA_enableEvtIntrRegion ( uint32_t  baseAddr,
uint32_t  regionId,
uint32_t  chNum 
)

Enables the user to enable the transfer completion interrupt generation by the EDMACC for all DMA/QDMA channels.

Parameters
baseAddrMemory address of the EDMA instance used.
regionIdRegion id to be used. Valid values are 0 to SOC_EDMA_NUM_REGIONS-1
chNumAllocated channel number. Valid values are 0 to SOC_EDMA_NUM_DMACH-1 for DMA

Note : To set any interrupt bit in IER, a 1 must be written to the corresponding interrupt bit in the interrupt enable set register.

◆ EDMA_disableEvtIntrRegion()

void EDMA_disableEvtIntrRegion ( uint32_t  baseAddr,
uint32_t  regionId,
uint32_t  chNum 
)

Enables the user to clear CC interrupts.

Parameters
baseAddrMemory address of the EDMA instance used.
regionIdRegion id to be used. Valid values are 0 to SOC_EDMA_NUM_REGIONS-1
chNumAllocated channel number. Valid values are 0 to SOC_EDMA_NUM_DMACH-1 for DMA

Note : Writes of 1 to the bits in IECR clear the corresponding interrupt bits in the interrupt enable registers (IER); writes of 0 have no effect.

◆ EDMA_clrIntrRegion()

void EDMA_clrIntrRegion ( uint32_t  baseAddr,
uint32_t  regionId,
uint32_t  value 
)

Enables the user to Clear an Interrupt.

Parameters
baseAddrMemory address of the EDMA instance used.
regionIdRegion id to be used. Valid values are 0 to SOC_EDMA_NUM_REGIONS-1
valueValue to be set to clear the Interrupt Status.

◆ EDMA_getEnabledIntrRegion()

uint32_t EDMA_getEnabledIntrRegion ( uint32_t  baseAddr,
uint32_t  regionId 
)

This function returns interrupt enable status of events which are less than 32.

Parameters
baseAddrMemory address of the EDMA instance used.
regionIdRegion id to be used. Valid values are 0 to SOC_EDMA_NUM_REGIONS-1
Returns
Interrupt status register value

◆ EDMA_getEnabledIntrHighRegion()

uint32_t EDMA_getEnabledIntrHighRegion ( uint32_t  baseAddr,
uint32_t  regionId 
)

This function returns interrupt enable status of events which are more than 32.

Parameters
baseAddrMemory address of the EDMA instance used.
regionIdRegion id to be used. Valid values are 0 to SOC_EDMA_NUM_REGIONS-1
Returns
Interrupt status register value

◆ EDMA_getPaRAM()

void EDMA_getPaRAM ( uint32_t  baseAddr,
uint32_t  paRAMId,
EDMACCPaRAMEntry *  currPaRAM 
)

Retrieve existing PaRAM set associated with specified logical channel (DMA/Link).

Parameters
baseAddrMemory address of the EDMA instance used.
paRAMIdpaRAMset ID whose parameter set is requested. Valid values are 0 to SOC_EDMA_NUM_PARAMSETS-1
currPaRAMUser gets the existing PaRAM here.

◆ EDMA_qdmaGetPaRAM()

void EDMA_qdmaGetPaRAM ( uint32_t  baseAddr,
uint32_t  paRAMId,
EDMACCPaRAMEntry *  currPaRAM 
)

Retrieve existing PaRAM set associated with specified logical channel (QDMA).

Parameters
baseAddrMemory address of the EDMA instance used.
paRAMIdpaRAMset ID whose parameter set is requested. Valid values are 0 to SOC_EDMA_NUM_PARAMSETS-1
currPaRAMUser gets the existing PaRAM here.

◆ EDMA_setPaRAM()

void EDMA_setPaRAM ( uint32_t  baseAddr,
uint32_t  paRAMId,
const EDMACCPaRAMEntry *  newPaRAM 
)

Copy the user specified PaRAM Set onto the PaRAM Set associated with the logical channel (DMA/Link).

This API takes a PaRAM Set as input and copies it onto the actual PaRAM Set associated with the logical channel. OPT field of the PaRAM Set is written first and the CCNT field is written last.

Parameters
baseAddrMemory address of the EDMA instance used.
paRAMIdpaRAMset ID whose parameter set has to be updated Valid values are 0 to SOC_EDMA_NUM_PARAMSETS-1
newPaRAMParameter RAM set to be copied onto existing PaRAM.

◆ EDMA_qdmaSetPaRAM()

void EDMA_qdmaSetPaRAM ( uint32_t  baseAddr,
uint32_t  paRAMId,
const EDMACCPaRAMEntry *  newPaRAM 
)

Copy the user specified PaRAM Set onto the PaRAM Set associated with the logical channel (QDMA only).

This API takes a PaRAM Set as input and copies it onto the actual PaRAM Set associated with the logical channel. OPT field of the PaRAM Set is written first and the CCNT field is written last.

Parameters
baseAddrMemory address of the EDMA instance used.
paRAMIdpaRaMset ID whose parameter set has to be updated Valid values are 0 to SOC_EDMA_NUM_PARAMSETS-1
newPaRAMParameter RAM set to be copied onto existing PaRAM.

◆ EDMA_qdmaSetPaRAMEntry()

void EDMA_qdmaSetPaRAMEntry ( uint32_t  baseAddr,
uint32_t  paRAMId,
uint32_t  paRAMEntry,
uint32_t  newPaRAMEntryVal 
)

Set a particular PaRAM set entry of the specified PaRAM set.

Parameters
baseAddrMemory address of the EDMA instance used.
paRAMIdPaRAM Id to which the QDMA channel is mapped to.
paRAMEntrySpecify the PaRAM set entry which needs to be set.
newPaRAMEntryValThe new field setting. Make sure this field is packed for setting certain fields in paRAM.

EDMACC_PARAM_ENTRY_OPT EDMACC_PARAM_ENTRY_SRC EDMACC_PARAM_ENTRY_ACNT_BCNT EDMACC_PARAM_ENTRY_DST EDMACC_PARAM_ENTRY_SRC_DST_BIDX EDMACC_PARAM_ENTRY_LINK_BCNTRLD EDMACC_PARAM_ENTRY_SRC_DST_CIDX EDMACC_PARAM_ENTRY_CCNT

Note
This API should be used while setting the PaRAM set entry for QDMA channels. If EDMAQdmaSetPaRAMEntry() used, it will trigger the QDMA channel before complete PaRAM set entry is written.

◆ EDMA_qdmaGetPaRAMEntry()

uint32_t EDMA_qdmaGetPaRAMEntry ( uint32_t  baseAddr,
uint32_t  paRAMId,
uint32_t  paRAMEntry 
)

Get a particular PaRAM entry of the specified PaRAM set.

Parameters
baseAddrMemory address of the EDMA instance used.
paRAMIdPaRAM Id to which the QDMA channel is mapped to.
paRAMEntrySpecify the PaRAM set entry which needs to be read.

paRAMEntry can have values:

EDMACC_PARAM_ENTRY_OPT EDMACC_PARAM_ENTRY_SRC EDMACC_PARAM_ENTRY_ACNT_BCNT EDMACC_PARAM_ENTRY_DST EDMACC_PARAM_ENTRY_SRC_DST_BIDX EDMACC_PARAM_ENTRY_LINK_BCNTRLD EDMACC_PARAM_ENTRY_SRC_DST_CIDX EDMACC_PARAM_ENTRY_CCNT

Returns
paRAMEntryVal The value of the paRAM field pointed by the paRAMEntry.
Note
This API should be used while reading the PaRAM set entry for QDMA channels. And the paRAMEntryVal is a packed value for certain fields of paRAMEntry.The user has to make sure the value is unpacked appropriately. For example, the third field is A_B_CNT. Hence he will have to unpack it to two 16 bit fields to get ACNT and BCNT.

◆ EDMA_dmaSetPaRAMEntry()

void EDMA_dmaSetPaRAMEntry ( uint32_t  baseAddr,
uint32_t  paRAMId,
uint32_t  paRAMEntry,
uint32_t  newPaRAMEntryVal 
)

Set a particular PaRAM set entry of the specified PaRAM set.

Parameters
baseAddrMemory address of the EDMA instance used.
paRAMIdPaRAM Id to which the DMA channel is mapped to.
paRAMEntrySpecify the PaRAM set entry which needs to be set.
newPaRAMEntryValThe new field setting. Make sure this field is packed for setting certain fields in paRAM.

EDMACC_PARAM_ENTRY_OPT EDMACC_PARAM_ENTRY_SRC EDMACC_PARAM_ENTRY_ACNT_BCNT EDMACC_PARAM_ENTRY_DST EDMACC_PARAM_ENTRY_SRC_DST_BIDX EDMACC_PARAM_ENTRY_LINK_BCNTRLD EDMACC_PARAM_ENTRY_SRC_DST_CIDX EDMACC_PARAM_ENTRY_CCNT

Note
This API should be used while setting the PaRAM set entry for DMA channels.

◆ EDMA_dmaGetPaRAMEntry()

uint32_t EDMA_dmaGetPaRAMEntry ( uint32_t  baseAddr,
uint32_t  paRAMId,
uint32_t  paRAMEntry 
)

Get a particular PaRAM entry of the specified PaRAM set.

Parameters
baseAddrMemory address of the EDMA instance used.
paRAMIdPaRAM Id to which the DMA channel is mapped to.
paRAMEntrySpecify the PaRAM set entry which needs to be read.

paRAMEntry can have values:

EDMACC_PARAM_ENTRY_OPT EDMACC_PARAM_ENTRY_SRC EDMACC_PARAM_ENTRY_ACNT_BCNT EDMACC_PARAM_ENTRY_DST EDMACC_PARAM_ENTRY_SRC_DST_BIDX EDMACC_PARAM_ENTRY_LINK_BCNTRLD EDMACC_PARAM_ENTRY_SRC_DST_CIDX EDMACC_PARAM_ENTRY_CCNT

Returns
paRAMEntryVal The value of the paRAM field pointed by the paRAMEntry.
Note
This API should be used while reading the PaRAM set entry for DMA channels. And the paRAMEntryVal is a packed value for certain fields of paRAMEntry.The user has to make sure the value is unpacked appropriately. For example, the third field is A_B_CNT. Hence he will have to unpack it to two 16 bit fields to get ACNT and BCNT.

◆ EDMA_configureChannelRegion()

uint32_t EDMA_configureChannelRegion ( uint32_t  baseAddr,
uint32_t  regionId,
uint32_t  chType,
uint32_t  chNum,
uint32_t  tccNum,
uint32_t  paramId,
uint32_t  evtQNum 
)

Request a DMA/QDMA/Link channel.

Each channel (DMA/QDMA/Link) must be requested before initiating a DMA transfer on that channel.

This API is used to allocate a logical channel (DMA/QDMA/Link) along with the associated resources. For DMA and QDMA channels, TCC and PaRAM Set are also allocated along with the requested channel.

User can request a specific logical channel by passing the channel number in 'chNum'.

For DMA/QDMA channels, after allocating all the EDMA resources, this API sets the TCC field of the OPT PaRAM Word with the allocated TCC. It also sets the event queue for the channel allocated. The event queue needs to be specified by the user.

For DMA channel, it also sets the DCHMAP register.

For QDMA channel, it sets the QCHMAP register and CCNT as trigger word and enables the QDMA channel by writing to the QEESR register.

Parameters
baseAddrMemory address of the EDMA instance used.
regionIdRegion id to be used. Valid values are 0 to SOC_EDMA_NUM_REGIONS-1
chType(DMA/QDMA) Channel For Example: For DMA it is EDMA_CHANNEL_TYPE_DMA.
chNumThis is the channel number requested for a particular event. Valid values are 0 to SOC_EDMA_NUM_DMACH-1 for DMA Valid values are 0 to SOC_EDMA_NUM_QDMACH-1 for QDMA
tccNumThe tcc number on which the completion/error interrupt is generated. Not used if user requested for a Link channel.
paramIdThe param number currosponding to the DMA/QDMA channel.
evtQNumEvent Queue Number to which the channel will be mapped (valid only for the Master Channel (DMA/QDMA) request).
Returns
TRUE if parameters are valid, else FALSE

◆ EDMA_freeChannelRegion()

uint32_t EDMA_freeChannelRegion ( uint32_t  baseAddr,
uint32_t  regionId,
uint32_t  chType,
uint32_t  chNum,
uint32_t  trigMode,
uint32_t  tccNum,
uint32_t  evtQNum 
)

Free the specified channel (DMA/QDMA/Link) and its associated resources (PaRAM Set, TCC etc) and removes various mappings.

For Link channels, this API only frees the associated PaRAM Set.

For DMA/QDMA channels, it does the following operations: 1) Disable any ongoing transfer on the channel,
2) Remove the channel to Event Queue mapping,
3) For DMA channels, clear the DCHMAP register, if available
4) For QDMA channels, clear the QCHMAP register,
5) Frees the DMA/QDMA channel in the end.

Parameters
baseAddrMemory address of the EDMA instance used.
regionIdRegion id to be used. Valid values are 0 to SOC_EDMA_NUM_REGIONS-1
chType(DMA/QDMA) Channel For Example: For QDMA it is, EDMA_CHANNEL_TYPE_QDMA.
chNumThis is the channel number requested for a particular event. Valid values are 0 to SOC_EDMA_NUM_DMACH-1 for DMA Valid values are 0 to SOC_EDMA_NUM_QDMACH-1 for QDMA
trigModeMode of triggering start of transfer.
tccNumThe channel number on which the completion/error interrupt is generated. Not used if user requested for a Link channel.
evtQNumEvent Queue Number to which the channel will be unmapped (valid only for the Master Channel (DMA/QDMA) request).
trigMode can have values: EDMA_TRIG_MODE_MANUAL
EDMA_TRIG_MODE_QDMA
EDMA_TRIG_MODE_EVENT
Returns
TRUE if parameters are valid else return FALSE

◆ EDMA_enableTransferRegion()

uint32_t EDMA_enableTransferRegion ( uint32_t  baseAddr,
uint32_t  regionId,
uint32_t  chNum,
uint32_t  trigMode 
)

Start EDMA transfer on the specified channel.

There are multiple ways to trigger an EDMA transfer. The triggering mode option allows choosing from the available triggering modes: Event, Manual or QDMA.

In event triggered, a peripheral or an externally generated event triggers the transfer. This API clears the Event and Event Miss Register and then enables the DMA channel by writing to the EESR.

In manual triggered mode, CPU manually triggers a transfer by writing a 1 in the Event Set Register ESR. This API writes to the ESR to start the transfer.

In QDMA triggered mode, a QDMA transfer is triggered when a CPU (or other EDMA programmer) writes to the trigger word of the QDMA channel PaRAM set (auto-triggered) or when the EDMACC performs a link update on a PaRAM set that has been mapped to a QDMA channel (link triggered). This API enables the QDMA channel by writing to the QEESR register.

Parameters
baseAddrMemory address of the EDMA instance used.
regionIdRegion id to be used. Valid values are 0 to SOC_EDMA_NUM_REGIONS-1
chNumChannel being used to enable transfer. Valid values are 0 to SOC_EDMA_NUM_DMACH-1 for DMA
trigModeMode of triggering start of transfer (Manual, QDMA or Event).
trigMode can have values: EDMA_TRIG_MODE_MANUAL
EDMA_TRIG_MODE_QDMA
EDMA_TRIG_MODE_EVENT
Returns
retVal TRUE or FALSE depending on the param passed.

◆ EDMA_disableTransferRegion()

uint32_t EDMA_disableTransferRegion ( uint32_t  baseAddr,
uint32_t  regionId,
uint32_t  chNum,
uint32_t  trigMode 
)

Disable DMA transfer on the specified channel.

There are multiple ways by which an EDMA transfer could be triggered. The triggering mode option allows choosing from the available triggering modes.

To disable a channel which was previously triggered in manual mode, this API clears the Secondary Event Register and Event Miss Register, if set, for the specific DMA channel.

To disable a channel which was previously triggered in QDMA mode, this API clears the QDMA Event Enable Register, for the specific QDMA channel.

To disable a channel which was previously triggered in event mode, this API clears the Event Enable Register, Event Register, Secondary Event Register and Event Miss Register, if set, for the specific DMA channel.

Parameters
baseAddrMemory address of the EDMA instance used.
regionIdRegion id to be used. Valid values are 0 to SOC_EDMA_NUM_REGIONS-1
chNumChannel being used to enable transfer. Valid values are 0 to SOC_EDMA_NUM_DMACH-1 for DMA
trigModeMode of triggering start of transfer (Manual, QDMA or Event).
Returns
retVal TRUE or FALSE depending on the param passed.

◆ EDMA_clearErrorBitsRegion()

void EDMA_clearErrorBitsRegion ( uint32_t  baseAddr,
uint32_t  regionId,
uint32_t  chNum,
uint32_t  evtQNum 
)

Clears Event Register and Error Register for a specific DMA channel and brings back EDMA to its initial state.

This API clears the Event register, Event Miss register, Event Enable register for a specific DMA channel. It also clears the CC Error register.

Parameters
baseAddrMemory address of the EDMA instance used.
regionIdRegion id to be used. Valid values are 0 to SOC_EDMA_NUM_REGIONS-1
chNumThis is the channel number requested for a particular event. Valid values are 0 to SOC_EDMA_NUM_DMACH-1 for DMA
evtQNumEvent Queue Number to which the channel will be unmapped (valid only for the Master Channel (DMA/QDMA) request).

◆ EDMA_getCCErrStatus()

uint32_t EDMA_getCCErrStatus ( uint32_t  baseAddr)

This returns EDMA CC error status.

Parameters
baseAddrMemory address of the EDMA instance used.
Returns
value Status of the Interrupt Pending Register

◆ EDMA_getErrIntrStatus()

uint32_t EDMA_getErrIntrStatus ( uint32_t  baseAddr)

This returns error interrupt status for those events whose event number is less than 32.

Parameters
baseAddrMemory address of the EDMA instance used.
Returns
value Status of the Interrupt Pending Register

◆ EDMA_qdmaGetErrIntrStatus()

uint32_t EDMA_qdmaGetErrIntrStatus ( uint32_t  baseAddr)

This returns QDMA error interrupt status.

Parameters
baseAddrMemory address of the EDMA instance used.
Returns
value Status of the QDMA Interrupt Pending Register

◆ EDMA_peripheralIdGet()

uint32_t EDMA_peripheralIdGet ( uint32_t  baseAddr)

This API return the revision Id of the peripheral.

Parameters
baseAddrMemory address of the EDMA instance used.
Returns
value Revision ID of the peripheral

◆ EDMA_intrStatusHighGetRegion()

uint32_t EDMA_intrStatusHighGetRegion ( uint32_t  baseAddr,
uint32_t  regionId 
)

This function returns interrupt status of those events which are greater than 32.

Parameters
baseAddrMemory address of the EDMA instance used.
regionIdRegion id to be used.
Returns
value Status of the Interrupt Pending High Register

◆ EDMA_readIntrStatusRegion()

uint32_t EDMA_readIntrStatusRegion ( uint32_t  baseAddr,
uint32_t  regionId,
uint32_t  tccNum 
)

This function reads interrupt status.

Parameters
baseAddrMemory address of the EDMA instance used.
regionIdRegion id to be used.
tccNumThe channel number on which the completion/error interrupt is generated.
Returns
value Status of the Interrupt Pending register

◆ EDMA_getEventStatus()

uint32_t EDMA_getEventStatus ( uint32_t  baseAddr)

This function returns status of those events which are less than 32.

Parameters
baseAddrMemory address of the EDMA instance used.
Returns
value Event pending status register value

◆ EDMA_getEventStatusHigh()

uint32_t EDMA_getEventStatusHigh ( uint32_t  baseAddr)

This function returns status of those events which are greater than 32.

Parameters
baseAddrMemory address of the EDMA instance used.
Returns
value Status of the Event Pending High Register

◆ EDMA_readEventStatusRegion()

uint32_t EDMA_readEventStatusRegion ( uint32_t  baseAddr,
uint32_t  chNum 
)

This function reads Event pending status.

Parameters
baseAddrMemory address of the EDMA instance used.
chNumChannel being used for transfer. Valid values are 0 to SOC_EDMA_NUM_DMACH-1 for DMA
Returns
value Status of the Event Pending register

◆ EDMA_errIntrHighStatusGet()

uint32_t EDMA_errIntrHighStatusGet ( uint32_t  baseAddr)

This returns error interrupt status for those events whose event number is greater than 32.

Parameters
baseAddrMemory address of the EDMA instance used.
Returns
value Status of the Interrupt Pending Register

◆ EDMA_chainChannel()

void EDMA_chainChannel ( uint32_t  baseAddr,
uint32_t  paRAMId1,
uint32_t  chId2,
uint32_t  chainOptions 
)

Chain the two specified channels.

This API is used to chain a DMA channel to a previously allocated DMA/QDMA channel

Chaining is different from Linking. The EDMA link feature reloads the current channel parameter set with the linked parameter set. The EDMA chaining feature does not modify or update any channel parameter set; it provides a synchronization event (or trigger) to the chained DMA channel, as soon as the transfer (final or intermediate) completes on the main DMA/QDMA channel.

Parameters
baseAddrMemory address of the EDMA instance used.
paRAMId1PaRAM set ID of physical channel1 to which particular paRAM set will be chained or PaRAM set ID in case another PaRAM set is being chained to this PaRAM set
chId2DMA channel which needs to be chained to the first DMA/QDMA channel.
chainOptionscombination of the following masks which control individual PaRAM OPT fields related to intermediate/final completion chaining and intermediate/final completion interrupt :
  • EDMA_OPT_TCCHEN_MASK
  • EDMA_OPT_ITCCHEN_MASK
  • EDMA_OPT_TCINTEN_MASK
  • EDMA_OPT_ITCINTEN_MASK e.g to enable final completion chaining and enable interrupt only for intermediate completion, set chainOptions as : EDMA_OPT_TCCHEN_MASK | EDMA_OPT_ITCINTEN_MASK

◆ EDMA_linkChannel()

void EDMA_linkChannel ( uint32_t  baseAddr,
uint32_t  paRAMId1,
uint32_t  paRAMId2 
)

Link two channels.

This API is used to link two previously allocated logical (DMA/QDMA/Link) channels.

It sets the Link field of the PaRAM set associated with first channel (chId1) to point it to the PaRAM set associated with second channel (chId2).

It also sets the TCC field of PaRAM set of second channel to the same as that of the first channel.

Parameters
baseAddrMemory address of the EDMA instance used.
paRAMId1PaRAM set ID of physical channel1 to which particular paRAM set will be linked or PaRAM set ID in case another PaRAM set is being linked to this PaRAM set
paRAMId2PaRAM set ID which is linked to channel with parameter ID paRAMId1

After the transfer based on the PaRAM set of channel1 is over, the PaRAM set paRAMId2 will be copied to the PaRAM set of channel1 and transfer will resume. For DMA channels, another sync event is required to initiate the transfer on the Link channel.

◆ EDMA_init()

void EDMA_init ( void  )

This function initializes the EDMA driver object and controller.

◆ EDMA_deinit()

void EDMA_deinit ( void  )

This function Deinitializes the EDMA driver object and controller.

◆ EDMA_isInitialized()

uint32_t EDMA_isInitialized ( EDMA_Handle  handle)

Function to check if EDMA is enabled or not.

Precondition
EDMA_open() has to be called first
Parameters
handleEDMA_Handle returned from EDMA_open()
Returns
TRUE or FALSE.
See also
EDMA_open()

◆ EDMA_open()

EDMA_Handle EDMA_open ( uint32_t  index,
const EDMA_Params prms 
)

This function opens a given EDMA instance.

Parameters
indexIndex of config to use in the EDMA_Config array
prmsPointer to open parameters.
Returns
A EDMA_Handle on success or a NULL on an error or if it has been opened already

◆ EDMA_getHandle()

EDMA_Handle EDMA_getHandle ( uint32_t  index)

This function returns the handle of an open EDMA Instance from the instance index.

Precondition
EDMA instance has been opened using EDMA_open()
Parameters
indexIndex of config to use in the EDMA_Config array
Returns
A EDMA_Handle if it has been opened already or NULL otherwise
See also
EDMA_init()
EDMA_open()

◆ EDMA_close()

void EDMA_close ( EDMA_Handle  handle)

Function to close a EDMA peripheral specified by the EDMA handle.

Precondition
EDMA_open() has to be called first
Parameters
handleEDMA_Handle returned from EDMA_open()
See also
EDMA_open()

◆ EDMA_isInterruptEnabled()

uint32_t EDMA_isInterruptEnabled ( EDMA_Handle  handle)

Function to check if EDMA interrupt is enabled.

Precondition
EDMA_open() has to be called first
Parameters
handleEDMA_Handle returned from EDMA_open()
See also
EDMA_open()

◆ EDMA_registerIntr()

int32_t EDMA_registerIntr ( EDMA_Handle  handle,
Edma_IntrObject intrObj 
)

Function to register callback function for a TCC.

Precondition
EDMA_open() has to be called first
Parameters
handleEDMA_Handle returned from EDMA_open()
intrObjPointer to interrupt parameters. intrObj will be held by the driver till EDMA_unregisterIntr() is called with the same intrObj and application should not modify the memory allocated to intrObj.
Returns
SystemP_SUCCESS if started successfully; else error on failure
See also
EDMA_open()

◆ EDMA_unregisterIntr()

int32_t EDMA_unregisterIntr ( EDMA_Handle  handle,
Edma_IntrObject intrObj 
)

Function to unregister callback function for a TCC.

Precondition
EDMA_registerIntr() has to be called first
Parameters
handleEDMA_Handle returned from EDMA_open()
intrObjPointer to interrupt parameters object. This is the same object passed to EDMA_registerIntr() for interrupt registeration.
Returns
SystemP_SUCCESS if started successfully; else error on failure
See also
EDMA_open()
EDMA_registerIntr()

◆ EDMA_getBaseAddr()

uint32_t EDMA_getBaseAddr ( EDMA_Handle  handle)

Function to get the edma base address.

Precondition
EDMA_open() has to be called first
Parameters
handleEDMA_Handle returned from EDMA_open()
Returns
edma base address if successful; 0 (NULL) on failure
See also
EDMA_open()

◆ EDMA_getRegionId()

uint32_t EDMA_getRegionId ( EDMA_Handle  handle)

Function to get the edma region.

Precondition
EDMA_open() has to be called first
Parameters
handleEDMA_Handle returned from EDMA_open()
Returns
region Id corresponding to the edma handle if successful SOC_EDMA_NUM_REGIONS upon failure which is invalid region number. valid region numbers are from 0 to (SOC_EDMA_NUM_REGIONS - 1)
See also
EDMA_open()

◆ EDMA_allocDmaChannel()

int32_t EDMA_allocDmaChannel ( EDMA_Handle  handle,
uint32_t *  dmaCh 
)

Function to allocate the Dma Channel.

Precondition
EDMA_open() has to be called first
Parameters
handleEDMA_Handle returned from EDMA_open()
dmaChSet the value to DMA channel number to be allocated. Set to EDMA_RESOURCE_ALLOC_ANY to allocate any owned channel. Allocated channel number is stored in this.
Returns
SystemP_SUCCESS if started successfully; else error on failure
See also
EDMA_open()

◆ EDMA_allocQdmaChannel()

int32_t EDMA_allocQdmaChannel ( EDMA_Handle  handle,
uint32_t *  qdmaCh 
)

Function to allocate the Dma Channel.

Precondition
EDMA_open() has to be called first
Parameters
handleEDMA_Handle returned from EDMA_open()
qdmaChSet the value to DMA channel number to be allocated. Set to EDMA_RESOURCE_ALLOC_ANY to allocate any owned channel. Allocated channel number is stored in this.
Returns
SystemP_SUCCESS if started successfully; else error on failure
See also
EDMA_open()

◆ EDMA_allocTcc()

int32_t EDMA_allocTcc ( EDMA_Handle  handle,
uint32_t *  tcc 
)

Function to allocate the Qdma Channel.

Precondition
EDMA_open() has to be called first
Parameters
handleEDMA_Handle returned from EDMA_open()
tccSet the value to QDMA channel number to be allocated. Set to EDMA_RESOURCE_ALLOC_ANY to allocate any owned Qdma channel. Allocated channel number is stored in this.
Returns
SystemP_SUCCESS if started successfully; else error on failure
See also
EDMA_open()

◆ EDMA_allocParam()

int32_t EDMA_allocParam ( EDMA_Handle  handle,
uint32_t *  param 
)

Function to allocate the TCC.

Precondition
EDMA_open() has to be called first
Parameters
handleEDMA_Handle returned from EDMA_open()
paramSet the value to TCC to be allocated. Set to EDMA_RESOURCE_ALLOC_ANY to allocate any owned TCC. Allocated TCC number is stored in this.
Returns
SystemP_SUCCESS if started successfully; else error on failure
See also
EDMA_open()

◆ EDMA_freeDmaChannel()

int32_t EDMA_freeDmaChannel ( EDMA_Handle  handle,
uint32_t *  dmaCh 
)

Function to free the Dma Channel.

Precondition
EDMA_open() has to be called first
Parameters
handleEDMA_Handle returned from EDMA_open()
dmaChdma channel allocated using the call to EDMA_allocDmaChannel()
Returns
SystemP_SUCCESS if started successfully; else error on failure
See also
EDMA_open()

◆ EDMA_freeQdmaChannel()

int32_t EDMA_freeQdmaChannel ( EDMA_Handle  handle,
uint32_t *  qdmaCh 
)

Function to free the Qdma Channel.

Precondition
EDMA_open() has to be called first
Parameters
handleEDMA_Handle returned from EDMA_open()
qdmaChqdma channel allocated using the call to EDMA_allocQdmaChannel()
Returns
SystemP_SUCCESS if started successfully; else error on failure
See also
EDMA_open()

◆ EDMA_freeTcc()

int32_t EDMA_freeTcc ( EDMA_Handle  handle,
uint32_t *  tcc 
)

Function to free the tcc Channel.

Precondition
EDMA_open() has to be called first
Parameters
handleEDMA_Handle returned from EDMA_open()
tcctcc channel allocated using the call to EDMA_allocTcc()
Returns
SystemP_SUCCESS if started successfully; else error on failure
See also
EDMA_open()

◆ EDMA_freeParam()

int32_t EDMA_freeParam ( EDMA_Handle  handle,
uint32_t *  param 
)

Function to free the Param.

Precondition
EDMA_open() has to be called first
Parameters
handleEDMA_Handle returned from EDMA_open()
paramparam allocated using the call to EDMA_allocParam()
Returns
SystemP_SUCCESS if started successfully; else error on failure
See also
EDMA_open()

Variable Documentation

◆ gEdmaConfig

EDMA_Config gEdmaConfig[]
extern

Externally defined driver configuration array.

◆ gEdmaConfigNum

uint32_t gEdmaConfigNum
extern

Externally defined driver configuration array size.

◆ gEdmaInitParams

EDMA_InitParams gEdmaInitParams[]
extern

Externally defined driver init parameters array.